mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>: fix build breakage in drm code caused by sysrq using bool but not including linux/types.h] [Sachin Sant <[email protected]>: fix build breakage in s390 keyboadr driver] Acked-by: Alan Cox <[email protected]> Acked-by: Jason Wessel <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
1495cc9df4
commit
f335397d17
14 changed files with 22 additions and 27 deletions
|
|
@ -159,7 +159,7 @@ static void hangcheck_fire(unsigned long data)
|
|||
if (hangcheck_dump_tasks) {
|
||||
printk(KERN_CRIT "Hangcheck: Task state:\n");
|
||||
#ifdef CONFIG_MAGIC_SYSRQ
|
||||
handle_sysrq('t', NULL);
|
||||
handle_sysrq('t');
|
||||
#endif /* CONFIG_MAGIC_SYSRQ */
|
||||
}
|
||||
if (hangcheck_reboot) {
|
||||
|
|
|
|||
|
|
@ -651,7 +651,7 @@ int hvc_poll(struct hvc_struct *hp)
|
|||
if (sysrq_pressed)
|
||||
continue;
|
||||
} else if (sysrq_pressed) {
|
||||
handle_sysrq(buf[i], tty);
|
||||
handle_sysrq(buf[i]);
|
||||
sysrq_pressed = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, const char *buf, int len)
|
|||
hp->sysrq = 1;
|
||||
continue;
|
||||
} else if (hp->sysrq) {
|
||||
handle_sysrq(c, hp->tty);
|
||||
handle_sysrq(c);
|
||||
hp->sysrq = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/mount.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/major.h>
|
||||
|
|
@ -493,7 +492,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
|||
sysrq_key_table[i] = op_p;
|
||||
}
|
||||
|
||||
void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
|
||||
void __handle_sysrq(int key, bool check_mask)
|
||||
{
|
||||
struct sysrq_key_op *op_p;
|
||||
int orig_log_level;
|
||||
|
|
@ -545,10 +544,10 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
|
|||
spin_unlock_irqrestore(&sysrq_key_table_lock, flags);
|
||||
}
|
||||
|
||||
void handle_sysrq(int key, struct tty_struct *tty)
|
||||
void handle_sysrq(int key)
|
||||
{
|
||||
if (sysrq_on())
|
||||
__handle_sysrq(key, tty, 1);
|
||||
__handle_sysrq(key, true);
|
||||
}
|
||||
EXPORT_SYMBOL(handle_sysrq);
|
||||
|
||||
|
|
@ -597,7 +596,7 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type,
|
|||
|
||||
default:
|
||||
if (sysrq_down && value && value != 2)
|
||||
__handle_sysrq(sysrq_xlate[code], NULL, 1);
|
||||
__handle_sysrq(sysrq_xlate[code], true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -765,7 +764,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
|||
|
||||
if (get_user(c, buf))
|
||||
return -EFAULT;
|
||||
__handle_sysrq(c, NULL, 0);
|
||||
__handle_sysrq(c, false);
|
||||
}
|
||||
|
||||
return count;
|
||||
|
|
|
|||
|
|
@ -16,12 +16,11 @@
|
|||
|
||||
#ifdef CONFIG_MAGIC_SYSRQ
|
||||
static int ctrlchar_sysrq_key;
|
||||
static struct tty_struct *sysrq_tty;
|
||||
|
||||
static void
|
||||
ctrlchar_handle_sysrq(struct work_struct *work)
|
||||
{
|
||||
handle_sysrq(ctrlchar_sysrq_key, sysrq_tty);
|
||||
handle_sysrq(ctrlchar_sysrq_key);
|
||||
}
|
||||
|
||||
static DECLARE_WORK(ctrlchar_work, ctrlchar_handle_sysrq);
|
||||
|
|
@ -54,7 +53,6 @@ ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty)
|
|||
/* racy */
|
||||
if (len == 3 && buf[1] == '-') {
|
||||
ctrlchar_sysrq_key = buf[2];
|
||||
sysrq_tty = tty;
|
||||
schedule_work(&ctrlchar_work);
|
||||
return CTRLCHAR_SYSRQ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode)
|
|||
if (kbd->sysrq) {
|
||||
if (kbd->sysrq == K(KT_LATIN, '-')) {
|
||||
kbd->sysrq = 0;
|
||||
handle_sysrq(value, kbd->tty);
|
||||
handle_sysrq(value);
|
||||
return;
|
||||
}
|
||||
if (value == '-') {
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
|
|||
sysrq_requested = 0;
|
||||
if (ch && time_before(jiffies, sysrq_timeout)) {
|
||||
spin_unlock_irqrestore(&port->sc_port.lock, flags);
|
||||
handle_sysrq(ch, NULL);
|
||||
handle_sysrq(ch);
|
||||
spin_lock_irqsave(&port->sc_port.lock, flags);
|
||||
/* ignore actual sysrq command char */
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty,
|
|||
{
|
||||
if (port->sysrq && port->port.console) {
|
||||
if (ch && time_before(jiffies, port->sysrq)) {
|
||||
handle_sysrq(ch, tty);
|
||||
handle_sysrq(ch);
|
||||
port->sysrq = 0;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
|
|||
goto again;
|
||||
|
||||
if (sysrq_key != '\0')
|
||||
handle_sysrq(sysrq_key, NULL);
|
||||
handle_sysrq(sysrq_key);
|
||||
}
|
||||
|
||||
static struct xenbus_watch sysrq_watch = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue