Commit c8e21ced authored by Rusty Russell's avatar Rusty Russell

module: fix kdb's illicit use of struct module_use.

Linus changed the structure, and luckily this didn't compile any more.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Martin Hicks <mort@sgi.com>
parent 2c02dfe7
...@@ -181,6 +181,13 @@ void *__symbol_get(const char *symbol); ...@@ -181,6 +181,13 @@ void *__symbol_get(const char *symbol);
void *__symbol_get_gpl(const char *symbol); void *__symbol_get_gpl(const char *symbol);
#define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x)))
/* modules using other modules: kdb wants to see this. */
struct module_use {
struct list_head source_list;
struct list_head target_list;
struct module *source, *target;
};
#ifndef __GENKSYMS__ #ifndef __GENKSYMS__
#ifdef CONFIG_MODVERSIONS #ifdef CONFIG_MODVERSIONS
/* Mark the CRC weak since genksyms apparently decides not to /* Mark the CRC weak since genksyms apparently decides not to
......
...@@ -1857,12 +1857,6 @@ static int kdb_ef(int argc, const char **argv) ...@@ -1857,12 +1857,6 @@ static int kdb_ef(int argc, const char **argv)
} }
#if defined(CONFIG_MODULES) #if defined(CONFIG_MODULES)
/* modules using other modules */
struct module_use {
struct list_head list;
struct module *module_which_uses;
};
/* /*
* kdb_lsmod - This function implements the 'lsmod' command. Lists * kdb_lsmod - This function implements the 'lsmod' command. Lists
* currently loaded kernel modules. * currently loaded kernel modules.
...@@ -1894,9 +1888,9 @@ static int kdb_lsmod(int argc, const char **argv) ...@@ -1894,9 +1888,9 @@ static int kdb_lsmod(int argc, const char **argv)
{ {
struct module_use *use; struct module_use *use;
kdb_printf(" [ "); kdb_printf(" [ ");
list_for_each_entry(use, &mod->modules_which_use_me, list_for_each_entry(use, &mod->source_list,
list) source_list)
kdb_printf("%s ", use->module_which_uses->name); kdb_printf("%s ", use->target->name);
kdb_printf("]\n"); kdb_printf("]\n");
} }
#endif #endif
......
...@@ -536,14 +536,6 @@ static void module_unload_init(struct module *mod) ...@@ -536,14 +536,6 @@ static void module_unload_init(struct module *mod)
mod->waiter = current; mod->waiter = current;
} }
/* modules using other modules */
struct module_use
{
struct list_head source_list;
struct list_head target_list;
struct module *source, *target;
};
/* Does a already use b? */ /* Does a already use b? */
static int already_uses(struct module *a, struct module *b) static int already_uses(struct module *a, struct module *b)
{ {
...@@ -589,8 +581,7 @@ static int add_module_usage(struct module *a, struct module *b) ...@@ -589,8 +581,7 @@ static int add_module_usage(struct module *a, struct module *b)
/* Module a uses b */ /* Module a uses b */
int use_module(struct module *a, struct module *b) int use_module(struct module *a, struct module *b)
{ {
struct module_use *use; int err;
int no_warn, err;
if (b == NULL || already_uses(a, b)) return 1; if (b == NULL || already_uses(a, b)) return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment