fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / video / igafb.c
index 6b88050..655ae0f 100644 (file)
@@ -33,7 +33,6 @@
 #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>
@@ -232,9 +231,6 @@ static int igafb_mmap(struct fb_info *info,
 
        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;
@@ -388,19 +384,21 @@ int __init igafb_init(void)
         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.
                 */
-               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;
        }
+       /* 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;
 
@@ -577,3 +575,10 @@ int __init igafb_setup(char *options)
 
 module_init(igafb_init);
 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);