Skip to content

Commit

Permalink
alpha: Fix build around srm_sysrq_reboot_op
Browse files Browse the repository at this point in the history
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: 0f1c968 ("tty/sysrq: alpha: export and use __sysrq_get_key_op()")
Cc: Emil Velikov <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
  • Loading branch information
joergroedel authored and mattst88 committed Jun 13, 2020
1 parent 7812193 commit 777747f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/alpha/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 777747f

Please sign in to comment.