]> git.baikalelectronics.ru Git - kernel.git/commitdiff
alpha: Fix build around srm_sysrq_reboot_op
authorJoerg Roedel <jroedel@suse.de>
Thu, 11 Jun 2020 09:11:39 +0000 (11:11 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2020 20:05:24 +0000 (13:05 -0700)
The patch introducing the struct was probably never compile tested,
because it sets a handler with a wrong function signature. Wrap the
handler into a functions with the correct signature to fix the build.

Fixes: 866e565ae70f ("tty/sysrq: alpha: export and use __sysrq_get_key_op()")
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/alpha/kernel/setup.c

index f5c42a8fcf9c83a7a00c07516a6f0c96f0269f66..53520f8cb9044f2e127910878248962bd7e0f445 100644 (file)
@@ -430,8 +430,13 @@ register_cpus(void)
 arch_initcall(register_cpus);
 
 #ifdef CONFIG_MAGIC_SYSRQ
+static void sysrq_reboot_handler(int unused)
+{
+       machine_halt();
+}
+
 static const struct sysrq_key_op srm_sysrq_reboot_op = {
-       .handler        = machine_halt,
+       .handler        = sysrq_reboot_handler,
        .help_msg       = "reboot(b)",
        .action_msg     = "Resetting",
        .enable_mask    = SYSRQ_ENABLE_BOOT,