Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11332830 authored by Jason Baron's avatar Jason Baron Committed by Greg Kroah-Hartman
Browse files

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: default avatarJason Baron <jbaron@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 555ac648
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(void)
				iter->logical_modname,
				iter->logical_modname,
				iter->flag_names, iter->hash, iter->hash2);
				iter->flag_names, iter->hash, iter->hash2);
	}
	}
	if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
		set_all(true);
	return 0;
	return 0;
}
}
module_init(dynamic_printk_init);
module_init(dynamic_printk_init);
@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(char *str)
{
{
	if (str)
	if (str)
		return -ENOENT;
		return -ENOENT;
	set_all(true);
	dynamic_enabled = DYNAMIC_ENABLED_ALL;
	return 0;
	return 0;
}
}
/* Use early_param(), so we can get debug output as early as possible */
/* Use early_param(), so we can get debug output as early as possible */