From 5d58dea45e7cd9eedc621ea5e256b4e4170f6a29 Mon Sep 17 00:00:00 2001
From: Dave Jones <davej@redhat.com>
Date: Wed, 19 Jan 2005 13:31:28 -0500
Subject: [PATCH] [AGPGART] remove leftovers of the inter_module_* drm <-> agp
 interface

From: Christoph Hellwig
Signed-off-by: Dave Jones <davej@redhat.com>
---
 drivers/char/agp/backend.c  | 15 ---------------
 include/linux/agp_backend.h | 18 ------------------
 2 files changed, 33 deletions(-)

diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 33e1c707d7c5..9eeaeea49a6c 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -214,17 +214,6 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
 				phys_to_virt(bridge->scratch_page_real));
 }
 
-static const drm_agp_t drm_agp = {
-	&agp_free_memory,
-	&agp_allocate_memory,
-	&agp_bind_memory,
-	&agp_unbind_memory,
-	&agp_enable,
-	&agp_backend_acquire,
-	&agp_backend_release,
-	&agp_copy_info
-};
-
 /* XXX Kludge alert: agpgart isn't ready for multiple bridges yet */
 struct agp_bridge_data *agp_alloc_bridge(void)
 {
@@ -277,9 +266,6 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
 		goto frontend_err;
 	}
 
-	/* FIXME: What to do with this? */
-	inter_module_register("drm_agp", THIS_MODULE, &drm_agp);
-
 	agp_count++;
 	return 0;
 
@@ -298,7 +284,6 @@ void agp_remove_bridge(struct agp_bridge_data *bridge)
 	bridge->type = NOT_SUPPORTED;
 	agp_frontend_cleanup();
 	agp_backend_cleanup(bridge);
-	inter_module_unregister("drm_agp");
 	agp_count--;
 	module_put(bridge->driver->owner);
 }
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 905f5332177a..7936986c289e 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -96,23 +96,5 @@ extern void agp_enable(u32);
 extern int agp_backend_acquire(void);
 extern void agp_backend_release(void);
 
-/*
- * Interface between drm and agp code.  When agp initializes, it makes
- * the below structure available via inter_module_register(), drm might
- * use it.  Keith Owens <kaos@ocs.com.au> 28 Oct 2000.
- */
-typedef struct {
-	void			(*free_memory)(struct agp_memory *);
-	struct agp_memory *	(*allocate_memory)(size_t, u32);
-	int			(*bind_memory)(struct agp_memory *, off_t);
-	int			(*unbind_memory)(struct agp_memory *);
-	void			(*enable)(u32);
-	int			(*acquire)(void);
-	void			(*release)(void);
-	int			(*copy_info)(struct agp_kern_info *);
-} drm_agp_t;
-
-extern const drm_agp_t *drm_agp_p;
-
 #endif				/* __KERNEL__ */
 #endif				/* _AGP_BACKEND_H */
-- 
2.30.9