aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/pm3fb.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 1d81ef47efd3..bd787e80177d 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -3299,14 +3299,12 @@ static void pm3fb_detect(void)
3299 fb_info[i].dev = NULL; 3299 fb_info[i].dev = NULL;
3300 } 3300 }
3301 3301
3302 dev = 3302 dev = pci_get_device(PCI_VENDOR_ID_3DLABS,
3303 pci_find_device(PCI_VENDOR_ID_3DLABS,
3304 PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev); 3303 PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev);
3305 3304
3306 for (i = 0; ((i < PM3_MAX_BOARD) && dev); i++) { 3305 for (i = 0; ((i < PM3_MAX_BOARD) && dev); i++) {
3307 dev_array[i] = dev; 3306 dev_array[i] = dev;
3308 dev = 3307 dev = pci_get_device(PCI_VENDOR_ID_3DLABS,
3309 pci_find_device(PCI_VENDOR_ID_3DLABS,
3310 PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev); 3308 PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev);
3311 } 3309 }
3312 3310
@@ -3353,7 +3351,7 @@ static void pm3fb_detect(void)
3353 /* now, initialize... or not */ 3351 /* now, initialize... or not */
3354 for (i = 0; i < PM3_MAX_BOARD; i++) { 3352 for (i = 0; i < PM3_MAX_BOARD; i++) {
3355 l_fb_info = &(fb_info[i]); 3353 l_fb_info = &(fb_info[i]);
3356 if ((l_fb_info->dev) && (!disable[i])) { /* PCI device was found and not disabled by user */ 3354 if (l_fb_info->dev && !disable[i]) { /* PCI device was found and not disabled by user */
3357 DPRINTK(2, 3355 DPRINTK(2,
3358 "found @%lx Vendor %lx Device %lx ; base @ : %lx - %lx - %lx - %lx - %lx - %lx, irq %ld\n", 3356 "found @%lx Vendor %lx Device %lx ; base @ : %lx - %lx - %lx - %lx - %lx - %lx, irq %ld\n",
3359 (unsigned long) l_fb_info->dev, 3357 (unsigned long) l_fb_info->dev,
@@ -3608,7 +3606,7 @@ int init_module(void)
3608 3606
3609 pm3fb_init(); 3607 pm3fb_init();
3610 3608
3611 return (0); 3609 return 0;
3612} 3610}
3613 3611
3614void cleanup_module(void) 3612void cleanup_module(void)
@@ -3619,23 +3617,18 @@ void cleanup_module(void)
3619 struct pm3fb_info *l_fb_info; 3617 struct pm3fb_info *l_fb_info;
3620 for (i = 0; i < PM3_MAX_BOARD; i++) { 3618 for (i = 0; i < PM3_MAX_BOARD; i++) {
3621 l_fb_info = &(fb_info[i]); 3619 l_fb_info = &(fb_info[i]);
3622 if ((l_fb_info->dev != NULL) 3620 pci_dev_put(l_fb_info->dev);
3623 && (!(disable[l_fb_info->board_num]))) { 3621 if (l_fb_info->dev != NULL && !(disable[l_fb_info->board_num])) {
3624 if (l_fb_info->vIOBase != 3622 if (l_fb_info->vIOBase != (unsigned char *) -1) {
3625 (unsigned char *) -1) {
3626 pm3fb_unmapIO(l_fb_info); 3623 pm3fb_unmapIO(l_fb_info);
3627 release_mem_region(l_fb_info->p_fb, 3624 release_mem_region(l_fb_info->p_fb,
3628 l_fb_info-> 3625 l_fb_info->fb_size);
3629 fb_size); 3626 release_mem_region(l_fb_info->pIOBase,
3630 release_mem_region(l_fb_info-> 3627 PM3_REGS_SIZE);
3631 pIOBase,
3632 PM3_REGS_SIZE);
3633 } 3628 }
3634 unregister_framebuffer(&l_fb_info->gen. 3629 unregister_framebuffer(&l_fb_info->gen.info);
3635 info);
3636 } 3630 }
3637 } 3631 }
3638 } 3632 }
3639 return;
3640} 3633}
3641#endif /* MODULE */ 3634#endif /* MODULE */