summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2008-10-27 12:05:14 -0400
committerStephen Rothwell <sfr@canb.auug.org.au>2008-10-28 10:31:41 +1100
commitb9005ce07e71fd4dc2dd398aea4d6e7f12852d9a (patch)
tree9db8515055c2af3858d90a58c2329e4654c162ab /lib
parent943afbe60e1b6f682c0a59bdf3ea7fbbf25daa55 (diff)
Driver core: fix 'dynamic_debug' cmd line parameter
In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command line didn't activate the debug code. The problem is that dynamic_printk_setup() (which activates the debugging) is being called before dynamic_printk_init() is called (which initializes infrastructure). Fix this by setting setting the state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also cause all subsequent modules to have debugging automatically started, which is probably the behavior we want. Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/dynamic_printk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dynamic_printk.c b/lib/dynamic_printk.c
index d640f87bdc9e..d83660fd6fdd 100644
--- a/lib/dynamic_printk.c
+++ b/lib/dynamic_printk.c
@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(void)
iter->logical_modname,
iter->flag_names, iter->hash, iter->hash2);
}
+ if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
+ set_all(true);
return 0;
}
module_init(dynamic_printk_init);
@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(char *str)
{
if (str)
return -ENOENT;
- set_all(true);
+ dynamic_enabled = DYNAMIC_ENABLED_ALL;
return 0;
}
/* Use early_param(), so we can get debug output as early as possible */