diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-06-26 03:27:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:32 -0400 |
commit | a06630f3e7fb29f2524e1d7b009eb8b5a278ba23 (patch) | |
tree | da80382cdbdda004fff12484281a3ddbad0069b3 /drivers/video | |
parent | 1c8ce271fe707d26b7bca4e490067fe65694b363 (diff) |
[PATCH] Detaching fbcon: remove calls to pci_disable_device()
Detaching fbcon allows individual drivers to be unloaded. However several
drivers call pci_disable_device() upon exit. This function will disable the
BAR's which will kill VGA text mode and/or affect X/DRM.
To prevent this, remove calls to pci_disable_device() from several drivers.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/aty/radeon_base.c | 2 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 2 | ||||
-rw-r--r-- | drivers/video/geode/gx1fb_core.c | 3 | ||||
-rw-r--r-- | drivers/video/geode/gxfb_core.c | 3 | ||||
-rw-r--r-- | drivers/video/i810/i810_main.c | 3 | ||||
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 7 | ||||
-rw-r--r-- | drivers/video/riva/fbdev.c | 2 |
7 files changed, 2 insertions, 20 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index c5ecbb02e01d..68b15645b893 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -2379,7 +2379,6 @@ err_release_pci0: | |||
2379 | err_release_fb: | 2379 | err_release_fb: |
2380 | framebuffer_release(info); | 2380 | framebuffer_release(info); |
2381 | err_disable: | 2381 | err_disable: |
2382 | pci_disable_device(pdev); | ||
2383 | err_out: | 2382 | err_out: |
2384 | return ret; | 2383 | return ret; |
2385 | } | 2384 | } |
@@ -2436,7 +2435,6 @@ static void __devexit radeonfb_pci_unregister (struct pci_dev *pdev) | |||
2436 | #endif | 2435 | #endif |
2437 | fb_dealloc_cmap(&info->cmap); | 2436 | fb_dealloc_cmap(&info->cmap); |
2438 | framebuffer_release(info); | 2437 | framebuffer_release(info); |
2439 | pci_disable_device(pdev); | ||
2440 | } | 2438 | } |
2441 | 2439 | ||
2442 | 2440 | ||
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 1103010af54a..dda240eb7360 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2227,7 +2227,6 @@ static void cirrusfb_pci_unmap (struct cirrusfb_info *cinfo) | |||
2227 | release_region(0x3C0, 32); | 2227 | release_region(0x3C0, 32); |
2228 | pci_release_regions(pdev); | 2228 | pci_release_regions(pdev); |
2229 | framebuffer_release(cinfo->info); | 2229 | framebuffer_release(cinfo->info); |
2230 | pci_disable_device(pdev); | ||
2231 | } | 2230 | } |
2232 | #endif /* CONFIG_PCI */ | 2231 | #endif /* CONFIG_PCI */ |
2233 | 2232 | ||
@@ -2458,7 +2457,6 @@ err_release_regions: | |||
2458 | err_release_fb: | 2457 | err_release_fb: |
2459 | framebuffer_release(info); | 2458 | framebuffer_release(info); |
2460 | err_disable: | 2459 | err_disable: |
2461 | pci_disable_device(pdev); | ||
2462 | err_out: | 2460 | err_out: |
2463 | return ret; | 2461 | return ret; |
2464 | } | 2462 | } |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 20e69156d728..4d3a8871d3d1 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -376,8 +376,6 @@ static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id * | |||
376 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 376 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
377 | } | 377 | } |
378 | 378 | ||
379 | pci_disable_device(pdev); | ||
380 | |||
381 | if (info) | 379 | if (info) |
382 | framebuffer_release(info); | 380 | framebuffer_release(info); |
383 | return ret; | 381 | return ret; |
@@ -399,7 +397,6 @@ static void gx1fb_remove(struct pci_dev *pdev) | |||
399 | iounmap(par->dc_regs); | 397 | iounmap(par->dc_regs); |
400 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 398 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
401 | 399 | ||
402 | pci_disable_device(pdev); | ||
403 | pci_set_drvdata(pdev, NULL); | 400 | pci_set_drvdata(pdev, NULL); |
404 | 401 | ||
405 | framebuffer_release(info); | 402 | framebuffer_release(info); |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 89c34b15f5d4..5ef12a3dfa50 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -354,8 +354,6 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i | |||
354 | pci_release_region(pdev, 2); | 354 | pci_release_region(pdev, 2); |
355 | } | 355 | } |
356 | 356 | ||
357 | pci_disable_device(pdev); | ||
358 | |||
359 | if (info) | 357 | if (info) |
360 | framebuffer_release(info); | 358 | framebuffer_release(info); |
361 | return ret; | 359 | return ret; |
@@ -377,7 +375,6 @@ static void gxfb_remove(struct pci_dev *pdev) | |||
377 | iounmap(par->dc_regs); | 375 | iounmap(par->dc_regs); |
378 | pci_release_region(pdev, 2); | 376 | pci_release_region(pdev, 2); |
379 | 377 | ||
380 | pci_disable_device(pdev); | ||
381 | pci_set_drvdata(pdev, NULL); | 378 | pci_set_drvdata(pdev, NULL); |
382 | 379 | ||
383 | framebuffer_release(info); | 380 | framebuffer_release(info); |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 44aa2ffff973..a1f7d80f0ac1 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -2110,9 +2110,6 @@ static void i810fb_release_resource(struct fb_info *info, | |||
2110 | if (par->res_flags & MMIO_REQ) | 2110 | if (par->res_flags & MMIO_REQ) |
2111 | release_mem_region(par->mmio_start_phys, MMIO_SIZE); | 2111 | release_mem_region(par->mmio_start_phys, MMIO_SIZE); |
2112 | 2112 | ||
2113 | if (par->res_flags & PCI_DEVICE_ENABLED) | ||
2114 | pci_disable_device(par->dev); | ||
2115 | |||
2116 | framebuffer_release(info); | 2113 | framebuffer_release(info); |
2117 | 2114 | ||
2118 | } | 2115 | } |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 65733e834704..7b5cffb27851 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1219,7 +1219,7 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd, | |||
1219 | 1219 | ||
1220 | if (pci_request_regions(pd, "nvidiafb")) { | 1220 | if (pci_request_regions(pd, "nvidiafb")) { |
1221 | printk(KERN_ERR PFX "cannot request PCI regions\n"); | 1221 | printk(KERN_ERR PFX "cannot request PCI regions\n"); |
1222 | goto err_out_request; | 1222 | goto err_out_enable; |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | par->FlatPanel = flatpanel; | 1225 | par->FlatPanel = flatpanel; |
@@ -1338,10 +1338,8 @@ err_out_free_base1: | |||
1338 | nvidia_delete_i2c_busses(par); | 1338 | nvidia_delete_i2c_busses(par); |
1339 | err_out_arch: | 1339 | err_out_arch: |
1340 | iounmap(par->REGS); | 1340 | iounmap(par->REGS); |
1341 | err_out_free_base0: | 1341 | err_out_free_base0: |
1342 | pci_release_regions(pd); | 1342 | pci_release_regions(pd); |
1343 | err_out_request: | ||
1344 | pci_disable_device(pd); | ||
1345 | err_out_enable: | 1343 | err_out_enable: |
1346 | kfree(info->pixmap.addr); | 1344 | kfree(info->pixmap.addr); |
1347 | err_out_kfree: | 1345 | err_out_kfree: |
@@ -1371,7 +1369,6 @@ static void __exit nvidiafb_remove(struct pci_dev *pd) | |||
1371 | nvidia_delete_i2c_busses(par); | 1369 | nvidia_delete_i2c_busses(par); |
1372 | iounmap(par->REGS); | 1370 | iounmap(par->REGS); |
1373 | pci_release_regions(pd); | 1371 | pci_release_regions(pd); |
1374 | pci_disable_device(pd); | ||
1375 | kfree(info->pixmap.addr); | 1372 | kfree(info->pixmap.addr); |
1376 | framebuffer_release(info); | 1373 | framebuffer_release(info); |
1377 | pci_set_drvdata(pd, NULL); | 1374 | pci_set_drvdata(pd, NULL); |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index d4384ab1df65..12af58c5cf1f 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -2152,7 +2152,6 @@ err_iounmap_ctrl_base: | |||
2152 | err_release_region: | 2152 | err_release_region: |
2153 | pci_release_regions(pd); | 2153 | pci_release_regions(pd); |
2154 | err_disable_device: | 2154 | err_disable_device: |
2155 | pci_disable_device(pd); | ||
2156 | err_free_pixmap: | 2155 | err_free_pixmap: |
2157 | kfree(info->pixmap.addr); | 2156 | kfree(info->pixmap.addr); |
2158 | err_framebuffer_release: | 2157 | err_framebuffer_release: |
@@ -2187,7 +2186,6 @@ static void __exit rivafb_remove(struct pci_dev *pd) | |||
2187 | if (par->riva.Architecture == NV_ARCH_03) | 2186 | if (par->riva.Architecture == NV_ARCH_03) |
2188 | iounmap(par->riva.PRAMIN); | 2187 | iounmap(par->riva.PRAMIN); |
2189 | pci_release_regions(pd); | 2188 | pci_release_regions(pd); |
2190 | pci_disable_device(pd); | ||
2191 | kfree(info->pixmap.addr); | 2189 | kfree(info->pixmap.addr); |
2192 | framebuffer_release(info); | 2190 | framebuffer_release(info); |
2193 | pci_set_drvdata(pd, NULL); | 2191 | pci_set_drvdata(pd, NULL); |