diff options
-rw-r--r-- | drivers/tty/sysrq.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 814655ee2d61..3687f0cad642 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -870,21 +870,20 @@ static struct input_handler sysrq_handler = { static bool sysrq_handler_registered; +unsigned short platform_sysrq_reset_seq[] __weak = { KEY_RESERVED }; + static inline void sysrq_register_handler(void) { - extern unsigned short platform_sysrq_reset_seq[] __weak; unsigned short key; int error; int i; - if (platform_sysrq_reset_seq) { - for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) { - key = platform_sysrq_reset_seq[i]; - if (key == KEY_RESERVED || key > KEY_MAX) - break; + for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) { + key = platform_sysrq_reset_seq[i]; + if (key == KEY_RESERVED || key > KEY_MAX) + break; - sysrq_reset_seq[sysrq_reset_seq_len++] = key; - } + sysrq_reset_seq[sysrq_reset_seq_len++] = key; } error = input_register_handler(&sysrq_handler); |