[PATCH] change nvidiafb_remove to __devexit
[powerpc.git] / drivers / video / nvidia / nvidia.c
index eb24107..5473742 100644 (file)
@@ -1160,20 +1160,20 @@ static u32 __devinit nvidia_get_arch(struct fb_info *info)
        case 0x0340:            /* GeForceFX 5700 */
                arch = NV_ARCH_30;
                break;
-       case 0x0040:
-       case 0x00C0:
-       case 0x0120:
+       case 0x0040:            /* GeForce 6800 */
+       case 0x00C0:            /* GeForce 6800 */
+       case 0x0120:            /* GeForce 6800 */
        case 0x0130:
-       case 0x0140:
-       case 0x0160:
-       case 0x01D0:
-       case 0x0090:
-       case 0x0210:
-       case 0x0220:
+       case 0x0140:            /* GeForce 6600 */
+       case 0x0160:            /* GeForce 6200 */
+       case 0x01D0:            /* GeForce 7200, 7300, 7400 */
+       case 0x0090:            /* GeForce 7800 */
+       case 0x0210:            /* GeForce 6800 */
+       case 0x0220:            /* GeForce 6200 */
        case 0x0230:
-       case 0x0240:
-       case 0x0290:
-       case 0x0390:
+       case 0x0240:            /* GeForce 6100 */
+       case 0x0290:            /* GeForce 7900 */
+       case 0x0390:            /* GeForce 7600 */
                arch = NV_ARCH_40;
                break;
        case 0x0020:            /* TNT, TNT2 */
@@ -1205,13 +1205,11 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd,
        par = info->par;
        par->pci_dev = pd;
 
-       info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL);
+       info->pixmap.addr = kzalloc(8 * 1024, GFP_KERNEL);
 
        if (info->pixmap.addr == NULL)
                goto err_out_kfree;
 
-       memset(info->pixmap.addr, 0, 8 * 1024);
-
        if (pci_enable_device(pd)) {
                printk(KERN_ERR PFX "cannot enable PCI device\n");
                goto err_out_enable;
@@ -1347,7 +1345,7 @@ err_out:
        return -ENODEV;
 }
 
-static void __exit nvidiafb_remove(struct pci_dev *pd)
+static void __devexit nvidiafb_remove(struct pci_dev *pd)
 {
        struct fb_info *info = pci_get_drvdata(pd);
        struct nvidia_par *par = info->par;
@@ -1433,7 +1431,7 @@ static struct pci_driver nvidiafb_driver = {
        .probe    = nvidiafb_probe,
        .suspend  = nvidiafb_suspend,
        .resume   = nvidiafb_resume,
-       .remove   = __exit_p(nvidiafb_remove),
+       .remove   = __devexit_p(nvidiafb_remove),
 };
 
 /* ------------------------------------------------------------------------- *