diff options
author | Dave Airlie <airlied@linux.ie> | 2004-06-21 11:46:52 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-06-21 11:46:52 +0000 |
commit | 87832bc81a56ad8abb135628ac906ba9aa4a155b (patch) | |
tree | eabf1a0fb239904c0e2003be967fc78eac81529b /linux-core | |
parent | 1ee210e3b5b2d0b9101e371ec1401cdc34b2f25d (diff) |
fix bug with pci_disable_device in the wrong place (Paul Mackerras) remove
hack code from me..
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_drv.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 00aa1871..1a01db56 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -548,8 +548,6 @@ static int DRM(takedown)( drm_device_t *dev ) wake_up_interruptible( &dev->lock.lock_queue ); } - if (DRM(fb_loaded)==0) - pci_disable_device(dev->pdev); up( &dev->struct_sem ); return 0; @@ -708,18 +706,14 @@ static int __init drm_init( void ) pdev = pci_get_subsys(DRM(pciidlist[i]).vendor, DRM(pciidlist[i]).device, DRM(pciidlist[i]).subvendor, DRM(pciidlist[i]).subdevice, NULL); if (pdev) { -#ifndef __MACH64_H__ pdriver = pci_dev_driver(pdev); if (pdriver) { -#endif DRM(fb_loaded)=1; drm_probe(pdev, &DRM(pciidlist[i])); -#ifndef __MACH64_H__ } else pci_dev_put(pdev); -#endif } } @@ -747,6 +741,9 @@ static void __exit drm_cleanup( drm_device_t *dev ) DRM(takedown)(dev); + if (DRM(fb_loaded)==0) + pci_disable_device(dev->pdev); + if ( DRM(stub_unregister)(dev->minor) ) { DRM_ERROR( "Cannot unload module\n" ); } else { |