Skip to contentSkip to conversation

agp_backend: remove drm_agp_t & inter_module_<foo> V1 [1/1]

RFC PATCH In review Chris Wedgwood 2 participants 2 messages Jan 20, 2005 Agpgart driver

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 agp_backend: remove drm_agp_t & inter_module_<foo> V1 [1/1]

What extremely obvious thing am I missing which prevents up from kill drm_agp_t and the inter_module_register, etc. code that goes with it?

I couldn't see any in-tree users of this stuff...

---

 drivers/char/agp/backend.c  |   15 ---------------
 include/linux/agp_backend.h |   18 ------------------
 2 files changed, 33 deletions(-)
drivers/char/agp/backend.c +0 -15
Index: cw-current/drivers/char/agp/backend.c
===================================================================
@@ -214,17 +214,6 @@
 				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 @@
 		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 @@
 	bridge->type = NOT_SUPPORTED;
 	agp_frontend_cleanup();
 	agp_backend_cleanup(bridge);
-	inter_module_unregister("drm_agp");
 	agp_count--;
 	module_put(bridge->driver->owner);
 }
include/linux/agp_backend.h +0 -18
Index: cw-current/include/linux/agp_backend.h
===================================================================
@@ -96,23 +96,5 @@
 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 <[email protected]> 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 */
#1 lore raw
Quoted 3 lines · Chris Wedgwood

What extremely obvious thing am I missing which prevents up from kill drm_agp_t and the inter_module_register, etc. code that goes with it?

Gar, this is the 3rd copy of this patch I've got.
I wanted the dust to settle on the agp carnage in -mm before merging anything else, but tbh, I'm so sick of the sight of this patch coming around every few days I'm going to merge it and let Andrew deal with any resulting breakage when he cuts the next -mm

Dave