patch-2.4.0-test11 linux/include/linux/mtd/map.h
Next file: linux/include/linux/netdevice.h
Previous file: linux/include/linux/mtd/cfi.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Tue Nov 7 10:46:04 2000
- Orig file:
v2.4.0-test10/linux/include/linux/mtd/map.h
- Orig date:
Tue Jul 4 10:12:34 2000
diff -u --recursive --new-file v2.4.0-test10/linux/include/linux/mtd/map.h linux/include/linux/mtd/map.h
@@ -7,7 +7,6 @@
#include <linux/types.h>
#include <linux/mtd/mtd.h>
-#include <linux/kmod.h>
#include <linux/malloc.h>
/* The map stuff is very simple. You fill in your struct map_info with
@@ -52,6 +51,7 @@
unsigned long map_priv_2;
void *fldrv_priv;
void (*fldrv_destroy)(struct mtd_info *);
+ const char *im_name;
};
/*
@@ -59,20 +59,13 @@
* if anything is recognised. Doesn't register it because the calling
* map driver needs to set the 'module' field first.
*/
-static inline struct mtd_info *do_map_probe(struct map_info *map, char *funcname, char *modname)
+static inline struct mtd_info *do_map_probe(struct map_info *map, const char *funcname, const char *modname)
{
struct mtd_info *(*probe_p)(struct map_info *);
struct mtd_info *mtd = NULL;
- probe_p = (void *)get_module_symbol(NULL, funcname);
- if (!probe_p) {
- request_module(modname);
- probe_p = (void *)get_module_symbol(NULL, funcname);
- }
- if (probe_p) {
- mtd = (*probe_p)(map);
- put_module_symbol((unsigned long)probe_p);
- }
+ if ((probe_p = inter_module_get_request(modname, funcname)))
+ mtd = (*probe_p)(map); /* map->im_name is set by probe */
return mtd;
}
@@ -95,7 +88,7 @@
struct map_info *map = mtd->priv;
map->fldrv_destroy(mtd);
- put_module_symbol((unsigned long)map->fldrv_destroy);
+ inter_module_put(map->im_name);
kfree(mtd);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)