diff options
author | Jason Baron <jbaron@redhat.com> | 2008-10-27 12:05:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-29 18:03:50 -0400 |
commit | 113328306dbdfd5f146f257e447364dc66d025d4 (patch) | |
tree | a62ad2388617b8e7943ed9133a582a3fcef7f0da /lib/dynamic_printk.c | |
parent | 555ac6482ea7d0f29ec524b816f2f547ec94e882 (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/dynamic_printk.c')
-rw-r--r-- | lib/dynamic_printk.c | 4 |
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) | |||
402 | iter->logical_modname, | 402 | iter->logical_modname, |
403 | iter->flag_names, iter->hash, iter->hash2); | 403 | iter->flag_names, iter->hash, iter->hash2); |
404 | } | 404 | } |
405 | if (dynamic_enabled == DYNAMIC_ENABLED_ALL) | ||
406 | set_all(true); | ||
405 | return 0; | 407 | return 0; |
406 | } | 408 | } |
407 | module_init(dynamic_printk_init); | 409 | module_init(dynamic_printk_init); |
@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(char *str) | |||
411 | { | 413 | { |
412 | if (str) | 414 | if (str) |
413 | return -ENOENT; | 415 | return -ENOENT; |
414 | set_all(true); | 416 | dynamic_enabled = DYNAMIC_ENABLED_ALL; |
415 | return 0; | 417 | return 0; |
416 | } | 418 | } |
417 | /* Use early_param(), so we can get debug output as early as possible */ | 419 | /* Use early_param(), so we can get debug output as early as possible */ |