Commit f335397d177c906256ee1bba28e8c49e8ec63817
1 parent
1495cc9df4
Exists in
master
and in
39 other branches
Input: sysrq - drop tty argument form handle_sysrq()
Sysrq operations do not accept tty argument anymore so no need to pass it to us. [Stephen Rothwell <sfr@canb.auug.org.au>: fix build breakage in drm code caused by sysrq using bool but not including linux/types.h] [Sachin Sant <sachinp@in.ibm.com>: fix build breakage in s390 keyboadr driver] Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Showing 14 changed files with 22 additions and 27 deletions Side-by-side Diff
- arch/ia64/hp/sim/simserial.c
- arch/um/drivers/mconsole_kern.c
- drivers/char/hangcheck-timer.c
- drivers/char/hvc_console.c
- drivers/char/hvsi.c
- drivers/char/sysrq.c
- drivers/s390/char/ctrlchar.c
- drivers/s390/char/keyboard.c
- drivers/serial/sn_console.c
- drivers/usb/serial/generic.c
- drivers/xen/manage.c
- include/linux/serial_core.h
- include/linux/sysrq.h
- kernel/debug/kdb/kdb_main.c
arch/ia64/hp/sim/simserial.c
arch/um/drivers/mconsole_kern.c
drivers/char/hangcheck-timer.c
drivers/char/hvc_console.c
drivers/char/hvsi.c
drivers/char/sysrq.c
... | ... | @@ -18,7 +18,6 @@ |
18 | 18 | #include <linux/interrupt.h> |
19 | 19 | #include <linux/mm.h> |
20 | 20 | #include <linux/fs.h> |
21 | -#include <linux/tty.h> | |
22 | 21 | #include <linux/mount.h> |
23 | 22 | #include <linux/kdev_t.h> |
24 | 23 | #include <linux/major.h> |
... | ... | @@ -493,7 +492,7 @@ |
493 | 492 | sysrq_key_table[i] = op_p; |
494 | 493 | } |
495 | 494 | |
496 | -void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | |
495 | +void __handle_sysrq(int key, bool check_mask) | |
497 | 496 | { |
498 | 497 | struct sysrq_key_op *op_p; |
499 | 498 | int orig_log_level; |
500 | 499 | |
... | ... | @@ -545,10 +544,10 @@ |
545 | 544 | spin_unlock_irqrestore(&sysrq_key_table_lock, flags); |
546 | 545 | } |
547 | 546 | |
548 | -void handle_sysrq(int key, struct tty_struct *tty) | |
547 | +void handle_sysrq(int key) | |
549 | 548 | { |
550 | 549 | if (sysrq_on()) |
551 | - __handle_sysrq(key, tty, 1); | |
550 | + __handle_sysrq(key, true); | |
552 | 551 | } |
553 | 552 | EXPORT_SYMBOL(handle_sysrq); |
554 | 553 | |
... | ... | @@ -597,7 +596,7 @@ |
597 | 596 | |
598 | 597 | default: |
599 | 598 | if (sysrq_down && value && value != 2) |
600 | - __handle_sysrq(sysrq_xlate[code], NULL, 1); | |
599 | + __handle_sysrq(sysrq_xlate[code], true); | |
601 | 600 | break; |
602 | 601 | } |
603 | 602 | |
... | ... | @@ -765,7 +764,7 @@ |
765 | 764 | |
766 | 765 | if (get_user(c, buf)) |
767 | 766 | return -EFAULT; |
768 | - __handle_sysrq(c, NULL, 0); | |
767 | + __handle_sysrq(c, false); | |
769 | 768 | } |
770 | 769 | |
771 | 770 | return count; |
drivers/s390/char/ctrlchar.c
... | ... | @@ -16,12 +16,11 @@ |
16 | 16 | |
17 | 17 | #ifdef CONFIG_MAGIC_SYSRQ |
18 | 18 | static int ctrlchar_sysrq_key; |
19 | -static struct tty_struct *sysrq_tty; | |
20 | 19 | |
21 | 20 | static void |
22 | 21 | ctrlchar_handle_sysrq(struct work_struct *work) |
23 | 22 | { |
24 | - handle_sysrq(ctrlchar_sysrq_key, sysrq_tty); | |
23 | + handle_sysrq(ctrlchar_sysrq_key); | |
25 | 24 | } |
26 | 25 | |
27 | 26 | static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq); |
... | ... | @@ -54,7 +53,6 @@ |
54 | 53 | /* racy */ |
55 | 54 | if (len == 3 && buf[1] == '-') { |
56 | 55 | ctrlchar_sysrq_key = buf[2]; |
57 | - sysrq_tty = tty; | |
58 | 56 | schedule_work(&ctrlchar_work); |
59 | 57 | return CTRLCHAR_SYSRQ; |
60 | 58 | } |
drivers/s390/char/keyboard.c
drivers/serial/sn_console.c
... | ... | @@ -492,7 +492,7 @@ |
492 | 492 | sysrq_requested = 0; |
493 | 493 | if (ch && time_before(jiffies, sysrq_timeout)) { |
494 | 494 | spin_unlock_irqrestore(&port->sc_port.lock, flags); |
495 | - handle_sysrq(ch, NULL); | |
495 | + handle_sysrq(ch); | |
496 | 496 | spin_lock_irqsave(&port->sc_port.lock, flags); |
497 | 497 | /* ignore actual sysrq command char */ |
498 | 498 | continue; |
drivers/usb/serial/generic.c
drivers/xen/manage.c
include/linux/serial_core.h
include/linux/sysrq.h
... | ... | @@ -15,10 +15,8 @@ |
15 | 15 | #define _LINUX_SYSRQ_H |
16 | 16 | |
17 | 17 | #include <linux/errno.h> |
18 | +#include <linux/types.h> | |
18 | 19 | |
19 | -struct pt_regs; | |
20 | -struct tty_struct; | |
21 | - | |
22 | 20 | /* Possible values of bitmask for enabling sysrq functions */ |
23 | 21 | /* 0x0001 is reserved for enable everything */ |
24 | 22 | #define SYSRQ_ENABLE_LOG 0x0002 |
... | ... | @@ -44,8 +42,8 @@ |
44 | 42 | * are available -- else NULL's). |
45 | 43 | */ |
46 | 44 | |
47 | -void handle_sysrq(int key, struct tty_struct *tty); | |
48 | -void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | |
45 | +void handle_sysrq(int key); | |
46 | +void __handle_sysrq(int key, bool check_mask); | |
49 | 47 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
50 | 48 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
51 | 49 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
52 | 50 | |
... | ... | @@ -54,11 +52,11 @@ |
54 | 52 | |
55 | 53 | #else |
56 | 54 | |
57 | -static inline void handle_sysrq(int key, struct tty_struct *tty) | |
55 | +static inline void handle_sysrq(int key) | |
58 | 56 | { |
59 | 57 | } |
60 | 58 | |
61 | -static inline void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | |
59 | +static inline void __handle_sysrq(int key, bool check_mask) | |
62 | 60 | { |
63 | 61 | } |
64 | 62 |
kernel/debug/kdb/kdb_main.c