From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Sat, 11 May 2013 14:04:57 +0100 Subject: [PATCH -v10 09/11] arm, prepare reboot_mode for moving to generic kernel code. In-Reply-To: <1368273447-11958-10-git-send-email-holt@sgi.com> References: <1368273447-11958-1-git-send-email-holt@sgi.com> <1368273447-11958-10-git-send-email-holt@sgi.com> Message-ID: <20130511130457.GD18614@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, May 11, 2013 at 06:57:25AM -0500, Robin Holt wrote: > This patch prepares for the moving the parsing of reboot= to the generic > kernel code by making reboot_mode into a more generic form. > > Signed-off-by: Robin Holt > To: Andrew Morton > To: Russell King > Cc: Russ Anderson > Cc: Robin Holt > Cc: H. Peter Anvin > Cc: Guan Xuetao > Cc: Linux Kernel Mailing List > Cc: the arch/x86 maintainers > Cc: Arm Mailing List Almost-but-not-quite-Acked-by: Russell King :) > diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c > index f219703..92b47df 100644 > --- a/arch/arm/kernel/process.c > +++ b/arch/arm/kernel/process.c > @@ -174,14 +174,14 @@ void arch_cpu_idle(void) > default_idle(); > } > > -static char reboot_mode = 'h'; > +enum reboot_mode reboot_mode = REBOOT_HARD; > > -int __init reboot_setup(char *str) > +static int __init reboot_setup(char *str) > { > - reboot_mode = str[0]; > + if ('s' == str[0]) > + reboot_mode = REBOOT_SOFT; Remember we talked about the 'gpio' mode as well, so you also need here + if ('g' == str[0]) reboot_mode = REBOOT_GPIO;