summaryrefslogtreecommitdiff
path: root/linux-core/drm_drv.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-28 22:25:06 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-28 22:25:06 +0000
commit0bff0d9eb6317ccccafc79cac7b235b4cb4c9161 (patch)
tree35ebf41ca1cccb77bd998beff7edce7d1980da62 /linux-core/drm_drv.c
parent9e421181ddfc2d91859e9959487baf2df851e743 (diff)
Getting the AGP module is a global resource. Make sure a dual PCI/AGP
driver doesn't release it on unload since an AGP driver may also be loaded.
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r--linux-core/drm_drv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 425320b1..669b1a25 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -608,7 +608,6 @@ static void __exit drm_cleanup( drm_device_t *dev )
}
if (drm_core_has_AGP(dev) && dev->agp ) {
- drm_agp_uninit();
drm_free( dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS );
dev->agp = NULL;
}
@@ -670,7 +669,7 @@ static int __init drm_core_init(void)
ret = -1;
goto err_p3;
}
- DRM_DEBUG("calling inter_module_register\n");
+ drm_agp = (drm_agp_t *)inter_module_get("drm_agp");
DRM_INFO( "Initialized %s %d.%d.%d %s\n",
DRIVER_NAME,
@@ -691,6 +690,9 @@ err_p1:
static void __exit drm_core_exit (void)
{
+ if (drm_agp)
+ inter_module_put("drm_agp");
+
remove_proc_entry("dri", NULL);
drm_sysfs_destroy(drm_class);