git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
video
/
igafb.c
diff --git
a/drivers/video/igafb.c
b/drivers/video/igafb.c
index
7e0353a
..
655ae0f
100644
(file)
--- a/
drivers/video/igafb.c
+++ b/
drivers/video/igafb.c
@@
-33,7
+33,6
@@
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
-#include <linux/tty.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/delay.h>
@@
-219,7
+218,7
@@
static void iga_blank_border(struct iga_par *par)
}
#ifdef __sparc__
}
#ifdef __sparc__
-static int igafb_mmap(struct fb_info *info,
struct file *file,
+static int igafb_mmap(struct fb_info *info,
struct vm_area_struct *vma)
{
struct iga_par *par = (struct iga_par *)info->par;
struct vm_area_struct *vma)
{
struct iga_par *par = (struct iga_par *)info->par;
@@
-232,9
+231,6
@@
static int igafb_mmap(struct fb_info *info, struct file *file,
size = vma->vm_end - vma->vm_start;
size = vma->vm_end - vma->vm_start;
- /* To stop the swapper from even considering these pages. */
- vma->vm_flags |= (VM_SHM | VM_LOCKED);
-
/* Each page, see which map applies */
for (page = 0; page < size; ) {
map_size = 0;
/* Each page, see which map applies */
for (page = 0; page < size; ) {
map_size = 0;
@@
-262,8
+258,8
@@
static int igafb_mmap(struct fb_info *info, struct file *file,
pgprot_val(vma->vm_page_prot) &= ~(par->mmap_map[i].prot_mask);
pgprot_val(vma->vm_page_prot) |= par->mmap_map[i].prot_flag;
pgprot_val(vma->vm_page_prot) &= ~(par->mmap_map[i].prot_mask);
pgprot_val(vma->vm_page_prot) |= par->mmap_map[i].prot_flag;
- if (remap_p
age_range(vma, vma->vm_start + page, map_offset
,
-
map_size, vma->vm_page_prot))
+ if (remap_p
fn_range(vma, vma->vm_start + page
,
+
map_offset >> PAGE_SHIFT,
map_size, vma->vm_page_prot))
return -EAGAIN;
page += map_size;
return -EAGAIN;
page += map_size;
@@
-357,7
+353,7
@@
static int __init iga_init(struct fb_info *info, struct iga_par *par)
video_cmap_len = 256;
info->fbops = &igafb_ops;
video_cmap_len = 256;
info->fbops = &igafb_ops;
- info->flags = FBINFO_
FLAG_
DEFAULT;
+ info->flags = FBINFO_DEFAULT;
fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
@@
-381,23
+377,28
@@
int __init igafb_init(void)
unsigned long addr;
int size, iga2000 = 0;
unsigned long addr;
int size, iga2000 = 0;
+ if (fb_get_options("igafb", NULL))
+ return -ENODEV;
+
/* Do not attach when we have a serial console. */
if (!con_is_present())
return -ENXIO;
/* Do not attach when we have a serial console. */
if (!con_is_present())
return -ENXIO;
- pdev = pci_
find_device(PCI_VENDOR_ID_INTERG,
+ pdev = pci_
get_device(PCI_VENDOR_ID_INTERG,
PCI_DEVICE_ID_INTERG_1682, 0);
if (pdev == NULL) {
/*
* XXX We tried to use cyber2000fb.c for IGS 2000.
* But it does not initialize the chip in JavaStation-E, alas.
*/
PCI_DEVICE_ID_INTERG_1682, 0);
if (pdev == NULL) {
/*
* XXX We tried to use cyber2000fb.c for IGS 2000.
* But it does not initialize the chip in JavaStation-E, alas.
*/
- pdev = pci_
find
_device(PCI_VENDOR_ID_INTERG, 0x2000, 0);
+ pdev = pci_
get
_device(PCI_VENDOR_ID_INTERG, 0x2000, 0);
if(pdev == NULL) {
return -ENXIO;
}
iga2000 = 1;
}
if(pdev == NULL) {
return -ENXIO;
}
iga2000 = 1;
}
+ /* We leak a reference here but as it cannot be unloaded this is
+ fine. If you write unload code remember to free it in unload */
size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
@@
-528,12
+529,12
@@
int __init igafb_init(void)
info->var = default_var;
info->fix = igafb_fix;
info->pseudo_palette = (void *)(par + 1);
info->var = default_var;
info->fix = igafb_fix;
info->pseudo_palette = (void *)(par + 1);
+ info->device = &pdev->dev;
if (!iga_init(info, par)) {
iounmap((void *)par->io_base);
iounmap(info->screen_base);
if (!iga_init(info, par)) {
iounmap((void *)par->io_base);
iounmap(info->screen_base);
- if (par->mmap_map)
- kfree(par->mmap_map);
+ kfree(par->mmap_map);
kfree(info);
}
kfree(info);
}
@@
-572,4
+573,12
@@
int __init igafb_setup(char *options)
return 0;
}
return 0;
}
+module_init(igafb_init);
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
+static struct pci_device_id igafb_pci_tbl[] __devinitdata = {
+ { PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_1682,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { }
+};
+
+MODULE_DEVICE_TABLE(pci, igafb_pci_tbl);