summaryrefslogtreecommitdiff
path: root/linux-core/drm_agpsupport.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_agpsupport.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_agpsupport.c')
-rw-r--r--linux-core/drm_agpsupport.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index 8165c835..bdb57a97 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -36,13 +36,10 @@
#if __OS_HAS_AGP
-#define DRM_AGP_GET (drm_agp_t *)inter_module_get("drm_agp")
-#define DRM_AGP_PUT inter_module_put("drm_agp")
-
/**
* Pointer to the drm_agp_t structure made available by the agpgart module.
*/
-static const drm_agp_t *drm_agp = NULL;
+const drm_agp_t *drm_agp = NULL;
/**
* AGP information ioctl.
@@ -401,9 +398,8 @@ int drm_agp_free(struct inode *inode, struct file *filp,
*/
drm_agp_head_t *drm_agp_init(void)
{
- drm_agp_head_t *head = NULL;
+ drm_agp_head_t *head = NULL;
- drm_agp = DRM_AGP_GET;
if (drm_agp) {
if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
return NULL;
@@ -425,17 +421,6 @@ drm_agp_head_t *drm_agp_init(void)
return head;
}
-/**
- * Free the AGP resources.
- *
- * Releases the pointer in ::drm_agp.
- */
-void drm_agp_uninit(void)
-{
- DRM_AGP_PUT;
- drm_agp = NULL;
-}
-
/** Calls drm_agp->allocate_memory() */
DRM_AGP_MEM *drm_agp_allocate_memory(size_t pages, u32 type)
{