From: Nicolas Pitre Date: Thu, 22 Nov 2012 18:33:35 +0000 (-0500) Subject: ARM: bL_switcher: add kernel cmdline param to disable the switcher on boot X-Git-Tag: firefly_0821_release~3680^2~238^2^2~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=345909633144390112598ed9a8ba05ef76c6c0f9;p=firefly-linux-kernel-4.4.55.git ARM: bL_switcher: add kernel cmdline param to disable the switcher on boot By adding no_bL_switcher to the kernel cmdline string, the switcher won't be activated automatically at boot time. It is still possible to activate it later with: echo 1 > /sys/kernel/bL_switcher/active Signed-off-by: Nicolas Pitre --- diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c index 31ca04c0ab49..f9b6b4607ba5 100644 --- a/arch/arm/common/bL_switcher.c +++ b/arch/arm/common/bL_switcher.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -529,6 +530,9 @@ static int __init bL_switcher_sysfs_init(void) #endif /* CONFIG_SYSFS */ +static bool no_bL_switcher; +core_param(no_bL_switcher, no_bL_switcher, bool, 0644); + static int __init bL_switcher_init(void) { int ret; @@ -538,9 +542,11 @@ static int __init bL_switcher_init(void) return -EINVAL; } - ret = bL_switcher_enable(); - if (ret) - return ret; + if (!no_bL_switcher) { + ret = bL_switcher_enable(); + if (ret) + return ret; + } #ifdef CONFIG_SYSFS ret = bL_switcher_sysfs_init();