summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drm_drv.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 00aa1871..1a01db56 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -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 {