]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/module.c
OMAP3: clock: Camera module doesn't have IDLEST bit
[linux-2.6-omap-h63xx.git] / kernel / module.c
index 29f2d7b33dd4ba388a8c681f5a65f925582ff441..f77ac320d0b51d021b52ba4c48dba5680e7c4d01 100644 (file)
@@ -856,7 +856,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
        mutex_lock(&module_mutex);
        /* Store the name of the last unloaded module for diagnostic purposes */
        strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
-       unregister_dynamic_debug_module(mod->name);
+       ddebug_remove_module(mod->name);
        free_module(mod);
 
  out:
@@ -1861,19 +1861,13 @@ static inline void add_kallsyms(struct module *mod,
 }
 #endif /* CONFIG_KALLSYMS */
 
-static void dynamic_printk_setup(struct mod_debug *debug, unsigned int num)
+static void dynamic_debug_setup(struct _ddebug *debug, unsigned int num)
 {
-#ifdef CONFIG_DYNAMIC_PRINTK_DEBUG
-       unsigned int i;
-
-       for (i = 0; i < num; i++) {
-               register_dynamic_debug_module(debug[i].modname,
-                                             debug[i].type,
-                                             debug[i].logical_modname,
-                                             debug[i].flag_names,
-                                             debug[i].hash, debug[i].hash2);
-       }
-#endif /* CONFIG_DYNAMIC_PRINTK_DEBUG */
+#ifdef CONFIG_DYNAMIC_DEBUG
+       if (ddebug_add_module(debug, num, debug->modname))
+               printk(KERN_ERR "dynamic debug error adding module: %s\n",
+                                       debug->modname);
+#endif
 }
 
 static void *module_alloc_update_bounds(unsigned long size)
@@ -2247,12 +2241,13 @@ static noinline struct module *load_module(void __user *umod,
        add_kallsyms(mod, sechdrs, symindex, strindex, secstrings);
 
        if (!mod->taints) {
-               struct mod_debug *debug;
+               struct _ddebug *debug;
                unsigned int num_debug;
 
                debug = section_objs(hdr, sechdrs, secstrings, "__verbose",
                                     sizeof(*debug), &num_debug);
-               dynamic_printk_setup(debug, num_debug);
+               if (debug)
+                       dynamic_debug_setup(debug, num_debug);
        }
 
        /* sechdrs[0].sh_size is always zero */