]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - kernel/debug/kdb/kdb_main.c
module: fix kdb's illicit use of struct module_use.
[net-next-2.6.git] / kernel / debug / kdb / kdb_main.c
index b724c791b6d45d7bf39a32ca0b9d02881055de9d..184cd8209c365de082c70c354f25758d22339ed8 100644 (file)
@@ -1857,12 +1857,6 @@ static int kdb_ef(int argc, const char **argv)
 }
 
 #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
  *     currently loaded kernel modules.
@@ -1894,9 +1888,9 @@ static int kdb_lsmod(int argc, const char **argv)
                {
                        struct module_use *use;
                        kdb_printf(" [ ");
-                       list_for_each_entry(use, &mod->modules_which_use_me,
-                                           list)
-                               kdb_printf("%s ", use->module_which_uses->name);
+                       list_for_each_entry(use, &mod->source_list,
+                                           source_list)
+                               kdb_printf("%s ", use->target->name);
                        kdb_printf("]\n");
                }
 #endif