Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: pxa27x_keypad - remove input_free_device() in pxa27x_keypad_remove()
  Input: mousedev - fix regression of inverting axes
  Input: uinput - add devname alias to allow module on-demand load
  Input: hil_kbd - fix compile error
  USB: drop tty argument from usb_serial_handle_sysrq_char()
  Input: sysrq - drop tty argument form handle_sysrq()
  Input: sysrq - drop tty argument from sysrq ops handlers
This commit is contained in:
Linus Torvalds 2010-08-28 13:55:31 -07:00
commit 2637d139fb
31 changed files with 75 additions and 80 deletions

View file

@ -230,7 +230,7 @@ static void etm_dump(void)
etb_lock(t); etb_lock(t);
} }
static void sysrq_etm_dump(int key, struct tty_struct *tty) static void sysrq_etm_dump(int key)
{ {
dev_dbg(tracer.dev, "Dumping ETB buffer\n"); dev_dbg(tracer.dev, "Dumping ETB buffer\n");
etm_dump(); etm_dump();

View file

@ -149,7 +149,7 @@ static void receive_chars(struct tty_struct *tty)
ch = ia64_ssc(0, 0, 0, 0, ch = ia64_ssc(0, 0, 0, 0,
SSC_GETCHAR); SSC_GETCHAR);
while (!ch); while (!ch);
handle_sysrq(ch, NULL); handle_sysrq(ch);
} }
#endif #endif
seen_esc = 0; seen_esc = 0;

View file

@ -2880,15 +2880,14 @@ static void xmon_init(int enable)
} }
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_xmon(int key, struct tty_struct *tty) static void sysrq_handle_xmon(int key)
{ {
/* ensure xmon is enabled */ /* ensure xmon is enabled */
xmon_init(1); xmon_init(1);
debugger(get_irq_regs()); debugger(get_irq_regs());
} }
static struct sysrq_key_op sysrq_xmon_op = static struct sysrq_key_op sysrq_xmon_op = {
{
.handler = sysrq_handle_xmon, .handler = sysrq_handle_xmon,
.help_msg = "Xmon", .help_msg = "Xmon",
.action_msg = "Entering xmon", .action_msg = "Entering xmon",

View file

@ -303,7 +303,7 @@ void arch_trigger_all_cpu_backtrace(void)
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_globreg(int key, struct tty_struct *tty) static void sysrq_handle_globreg(int key)
{ {
arch_trigger_all_cpu_backtrace(); arch_trigger_all_cpu_backtrace();
} }

View file

@ -690,7 +690,7 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
static void sysrq_proc(void *arg) static void sysrq_proc(void *arg)
{ {
char *op = arg; char *op = arg;
handle_sysrq(*op, NULL); handle_sysrq(*op);
} }
void mconsole_sysrq(struct mc_request *req) void mconsole_sysrq(struct mc_request *req)

View file

@ -159,7 +159,7 @@ static void hangcheck_fire(unsigned long data)
if (hangcheck_dump_tasks) { if (hangcheck_dump_tasks) {
printk(KERN_CRIT "Hangcheck: Task state:\n"); printk(KERN_CRIT "Hangcheck: Task state:\n");
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
handle_sysrq('t', NULL); handle_sysrq('t');
#endif /* CONFIG_MAGIC_SYSRQ */ #endif /* CONFIG_MAGIC_SYSRQ */
} }
if (hangcheck_reboot) { if (hangcheck_reboot) {

View file

@ -651,7 +651,7 @@ int hvc_poll(struct hvc_struct *hp)
if (sysrq_pressed) if (sysrq_pressed)
continue; continue;
} else if (sysrq_pressed) { } else if (sysrq_pressed) {
handle_sysrq(buf[i], tty); handle_sysrq(buf[i]);
sysrq_pressed = 0; sysrq_pressed = 0;
continue; continue;
} }

View file

@ -403,7 +403,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, const char *buf, int len)
hp->sysrq = 1; hp->sysrq = 1;
continue; continue;
} else if (hp->sysrq) { } else if (hp->sysrq) {
handle_sysrq(c, hp->tty); handle_sysrq(c);
hp->sysrq = 0; hp->sysrq = 0;
continue; continue;
} }

View file

@ -18,7 +18,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/tty.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include <linux/major.h> #include <linux/major.h>
@ -76,7 +75,7 @@ static int __init sysrq_always_enabled_setup(char *str)
__setup("sysrq_always_enabled", sysrq_always_enabled_setup); __setup("sysrq_always_enabled", sysrq_always_enabled_setup);
static void sysrq_handle_loglevel(int key, struct tty_struct *tty) static void sysrq_handle_loglevel(int key)
{ {
int i; int i;
@ -93,7 +92,7 @@ static struct sysrq_key_op sysrq_loglevel_op = {
}; };
#ifdef CONFIG_VT #ifdef CONFIG_VT
static void sysrq_handle_SAK(int key, struct tty_struct *tty) static void sysrq_handle_SAK(int key)
{ {
struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work; struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
schedule_work(SAK_work); schedule_work(SAK_work);
@ -109,7 +108,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
#endif #endif
#ifdef CONFIG_VT #ifdef CONFIG_VT
static void sysrq_handle_unraw(int key, struct tty_struct *tty) static void sysrq_handle_unraw(int key)
{ {
struct kbd_struct *kbd = &kbd_table[fg_console]; struct kbd_struct *kbd = &kbd_table[fg_console];
@ -126,7 +125,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL) #define sysrq_unraw_op (*(struct sysrq_key_op *)NULL)
#endif /* CONFIG_VT */ #endif /* CONFIG_VT */
static void sysrq_handle_crash(int key, struct tty_struct *tty) static void sysrq_handle_crash(int key)
{ {
char *killer = NULL; char *killer = NULL;
@ -141,7 +140,7 @@ static struct sysrq_key_op sysrq_crash_op = {
.enable_mask = SYSRQ_ENABLE_DUMP, .enable_mask = SYSRQ_ENABLE_DUMP,
}; };
static void sysrq_handle_reboot(int key, struct tty_struct *tty) static void sysrq_handle_reboot(int key)
{ {
lockdep_off(); lockdep_off();
local_irq_enable(); local_irq_enable();
@ -154,7 +153,7 @@ static struct sysrq_key_op sysrq_reboot_op = {
.enable_mask = SYSRQ_ENABLE_BOOT, .enable_mask = SYSRQ_ENABLE_BOOT,
}; };
static void sysrq_handle_sync(int key, struct tty_struct *tty) static void sysrq_handle_sync(int key)
{ {
emergency_sync(); emergency_sync();
} }
@ -165,7 +164,7 @@ static struct sysrq_key_op sysrq_sync_op = {
.enable_mask = SYSRQ_ENABLE_SYNC, .enable_mask = SYSRQ_ENABLE_SYNC,
}; };
static void sysrq_handle_show_timers(int key, struct tty_struct *tty) static void sysrq_handle_show_timers(int key)
{ {
sysrq_timer_list_show(); sysrq_timer_list_show();
} }
@ -176,7 +175,7 @@ static struct sysrq_key_op sysrq_show_timers_op = {
.action_msg = "Show clockevent devices & pending hrtimers (no others)", .action_msg = "Show clockevent devices & pending hrtimers (no others)",
}; };
static void sysrq_handle_mountro(int key, struct tty_struct *tty) static void sysrq_handle_mountro(int key)
{ {
emergency_remount(); emergency_remount();
} }
@ -188,7 +187,7 @@ static struct sysrq_key_op sysrq_mountro_op = {
}; };
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
static void sysrq_handle_showlocks(int key, struct tty_struct *tty) static void sysrq_handle_showlocks(int key)
{ {
debug_show_all_locks(); debug_show_all_locks();
} }
@ -226,7 +225,7 @@ static void sysrq_showregs_othercpus(struct work_struct *dummy)
static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus); static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);
static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) static void sysrq_handle_showallcpus(int key)
{ {
/* /*
* Fall back to the workqueue based printing if the * Fall back to the workqueue based printing if the
@ -252,7 +251,7 @@ static struct sysrq_key_op sysrq_showallcpus_op = {
}; };
#endif #endif
static void sysrq_handle_showregs(int key, struct tty_struct *tty) static void sysrq_handle_showregs(int key)
{ {
struct pt_regs *regs = get_irq_regs(); struct pt_regs *regs = get_irq_regs();
if (regs) if (regs)
@ -266,7 +265,7 @@ static struct sysrq_key_op sysrq_showregs_op = {
.enable_mask = SYSRQ_ENABLE_DUMP, .enable_mask = SYSRQ_ENABLE_DUMP,
}; };
static void sysrq_handle_showstate(int key, struct tty_struct *tty) static void sysrq_handle_showstate(int key)
{ {
show_state(); show_state();
} }
@ -277,7 +276,7 @@ static struct sysrq_key_op sysrq_showstate_op = {
.enable_mask = SYSRQ_ENABLE_DUMP, .enable_mask = SYSRQ_ENABLE_DUMP,
}; };
static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty) static void sysrq_handle_showstate_blocked(int key)
{ {
show_state_filter(TASK_UNINTERRUPTIBLE); show_state_filter(TASK_UNINTERRUPTIBLE);
} }
@ -291,7 +290,7 @@ static struct sysrq_key_op sysrq_showstate_blocked_op = {
#ifdef CONFIG_TRACING #ifdef CONFIG_TRACING
#include <linux/ftrace.h> #include <linux/ftrace.h>
static void sysrq_ftrace_dump(int key, struct tty_struct *tty) static void sysrq_ftrace_dump(int key)
{ {
ftrace_dump(DUMP_ALL); ftrace_dump(DUMP_ALL);
} }
@ -305,7 +304,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = {
#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL) #define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL)
#endif #endif
static void sysrq_handle_showmem(int key, struct tty_struct *tty) static void sysrq_handle_showmem(int key)
{ {
show_mem(); show_mem();
} }
@ -330,7 +329,7 @@ static void send_sig_all(int sig)
} }
} }
static void sysrq_handle_term(int key, struct tty_struct *tty) static void sysrq_handle_term(int key)
{ {
send_sig_all(SIGTERM); send_sig_all(SIGTERM);
console_loglevel = 8; console_loglevel = 8;
@ -349,7 +348,7 @@ static void moom_callback(struct work_struct *ignored)
static DECLARE_WORK(moom_work, moom_callback); static DECLARE_WORK(moom_work, moom_callback);
static void sysrq_handle_moom(int key, struct tty_struct *tty) static void sysrq_handle_moom(int key)
{ {
schedule_work(&moom_work); schedule_work(&moom_work);
} }
@ -361,7 +360,7 @@ static struct sysrq_key_op sysrq_moom_op = {
}; };
#ifdef CONFIG_BLOCK #ifdef CONFIG_BLOCK
static void sysrq_handle_thaw(int key, struct tty_struct *tty) static void sysrq_handle_thaw(int key)
{ {
emergency_thaw_all(); emergency_thaw_all();
} }
@ -373,7 +372,7 @@ static struct sysrq_key_op sysrq_thaw_op = {
}; };
#endif #endif
static void sysrq_handle_kill(int key, struct tty_struct *tty) static void sysrq_handle_kill(int key)
{ {
send_sig_all(SIGKILL); send_sig_all(SIGKILL);
console_loglevel = 8; console_loglevel = 8;
@ -385,7 +384,7 @@ static struct sysrq_key_op sysrq_kill_op = {
.enable_mask = SYSRQ_ENABLE_SIGNAL, .enable_mask = SYSRQ_ENABLE_SIGNAL,
}; };
static void sysrq_handle_unrt(int key, struct tty_struct *tty) static void sysrq_handle_unrt(int key)
{ {
normalize_rt_tasks(); normalize_rt_tasks();
} }
@ -493,7 +492,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
sysrq_key_table[i] = 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; struct sysrq_key_op *op_p;
int orig_log_level; int orig_log_level;
@ -520,7 +519,7 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
printk("%s\n", op_p->action_msg); printk("%s\n", op_p->action_msg);
console_loglevel = orig_log_level; console_loglevel = orig_log_level;
op_p->handler(key, tty); op_p->handler(key);
} else { } else {
printk("This sysrq operation is disabled.\n"); printk("This sysrq operation is disabled.\n");
} }
@ -545,10 +544,10 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
spin_unlock_irqrestore(&sysrq_key_table_lock, flags); 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()) if (sysrq_on())
__handle_sysrq(key, tty, 1); __handle_sysrq(key, true);
} }
EXPORT_SYMBOL(handle_sysrq); EXPORT_SYMBOL(handle_sysrq);
@ -597,7 +596,7 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type,
default: default:
if (sysrq_down && value && value != 2) if (sysrq_down && value && value != 2)
__handle_sysrq(sysrq_xlate[code], NULL, 1); __handle_sysrq(sysrq_xlate[code], true);
break; break;
} }
@ -765,7 +764,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
if (get_user(c, buf)) if (get_user(c, buf))
return -EFAULT; return -EFAULT;
__handle_sysrq(c, NULL, 0); __handle_sysrq(c, false);
} }
return count; return count;

View file

@ -370,7 +370,7 @@ static void drm_fb_helper_restore_work_fn(struct work_struct *ignored)
} }
static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn); static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn);
static void drm_fb_helper_sysrq(int dummy1, struct tty_struct *dummy3) static void drm_fb_helper_sysrq(int dummy1)
{ {
schedule_work(&drm_fb_helper_restore_work); schedule_work(&drm_fb_helper_restore_work);
} }

View file

@ -232,13 +232,13 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr)
if (absdev) { if (absdev) {
val = lo + (hi << 8); val = lo + (hi << 8);
#ifdef TABLET_AUTOADJUST #ifdef TABLET_AUTOADJUST
if (val < input_abs_min(dev, ABS_X + i)) if (val < input_abs_get_min(dev, ABS_X + i))
input_abs_set_min(dev, ABS_X + i, val); input_abs_set_min(dev, ABS_X + i, val);
if (val > input_abs_max(dev, ABS_X + i)) if (val > input_abs_get_max(dev, ABS_X + i))
input_abs_set_max(dev, ABS_X + i, val); input_abs_set_max(dev, ABS_X + i, val);
#endif #endif
if (i % 3) if (i % 3)
val = input_abs_max(dev, ABS_X + i) - val; val = input_abs_get_max(dev, ABS_X + i) - val;
input_report_abs(dev, ABS_X + i, val); input_report_abs(dev, ABS_X + i, val);
} else { } else {
val = (int) (((int8_t) lo) | ((int8_t) hi << 8)); val = (int) (((int8_t) lo) | ((int8_t) hi << 8));
@ -388,11 +388,11 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr)
#ifdef TABLET_AUTOADJUST #ifdef TABLET_AUTOADJUST
for (i = 0; i < ABS_MAX; i++) { for (i = 0; i < ABS_MAX; i++) {
int diff = input_abs_max(input_dev, ABS_X + i) / 10; int diff = input_abs_get_max(input_dev, ABS_X + i) / 10;
input_abs_set_min(input_dev, ABS_X + i, input_abs_set_min(input_dev, ABS_X + i,
input_abs_min(input_dev, ABS_X + i) + diff) input_abs_get_min(input_dev, ABS_X + i) + diff);
input_abs_set_max(input_dev, ABS_X + i, input_abs_set_max(input_dev, ABS_X + i,
input_abs_max(input_dev, ABS_X + i) - diff) input_abs_get_max(input_dev, ABS_X + i) - diff);
} }
#endif #endif

View file

@ -567,8 +567,6 @@ static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)
clk_put(keypad->clk); clk_put(keypad->clk);
input_unregister_device(keypad->input_dev); input_unregister_device(keypad->input_dev);
input_free_device(keypad->input_dev);
iounmap(keypad->mmio_base); iounmap(keypad->mmio_base);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

View file

@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = {
.minor = UINPUT_MINOR, .minor = UINPUT_MINOR,
.name = UINPUT_NAME, .name = UINPUT_NAME,
}; };
MODULE_ALIAS_MISCDEV(UINPUT_MINOR);
MODULE_ALIAS("devname:" UINPUT_NAME);
static int __init uinput_init(void) static int __init uinput_init(void)
{ {

View file

@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fx(0) = value; fx(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) { if (mousedev->touch && mousedev->pkt_count >= 2) {
size = input_abs_get_min(dev, ABS_X) - size = input_abs_get_max(dev, ABS_X) -
input_abs_get_max(dev, ABS_X); input_abs_get_min(dev, ABS_X);
if (size == 0) if (size == 0)
size = 256 * 2; size = 256 * 2;
@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fy(0) = value; fy(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) { if (mousedev->touch && mousedev->pkt_count >= 2) {
/* use X size for ABS_Y to keep the same scale */ /* use X size for ABS_Y to keep the same scale */
size = input_abs_get_min(dev, ABS_X) - size = input_abs_get_max(dev, ABS_X) -
input_abs_get_max(dev, ABS_X); input_abs_get_min(dev, ABS_X);
if (size == 0) if (size == 0)
size = 256 * 2; size = 256 * 2;

View file

@ -238,7 +238,7 @@ void emac_dbg_dump_all(void)
} }
#if defined(CONFIG_MAGIC_SYSRQ) #if defined(CONFIG_MAGIC_SYSRQ)
static void emac_sysrq_handler(int key, struct tty_struct *tty) static void emac_sysrq_handler(int key)
{ {
emac_dbg_dump_all(); emac_dbg_dump_all();
} }

View file

@ -16,12 +16,11 @@
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
static int ctrlchar_sysrq_key; static int ctrlchar_sysrq_key;
static struct tty_struct *sysrq_tty;
static void static void
ctrlchar_handle_sysrq(struct work_struct *work) 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); 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 */ /* racy */
if (len == 3 && buf[1] == '-') { if (len == 3 && buf[1] == '-') {
ctrlchar_sysrq_key = buf[2]; ctrlchar_sysrq_key = buf[2];
sysrq_tty = tty;
schedule_work(&ctrlchar_work); schedule_work(&ctrlchar_work);
return CTRLCHAR_SYSRQ; return CTRLCHAR_SYSRQ;
} }

View file

@ -305,7 +305,7 @@ kbd_keycode(struct kbd_data *kbd, unsigned int keycode)
if (kbd->sysrq) { if (kbd->sysrq) {
if (kbd->sysrq == K(KT_LATIN, '-')) { if (kbd->sysrq == K(KT_LATIN, '-')) {
kbd->sysrq = 0; kbd->sysrq = 0;
handle_sysrq(value, kbd->tty); handle_sysrq(value);
return; return;
} }
if (value == '-') { if (value == '-') {

View file

@ -492,7 +492,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
sysrq_requested = 0; sysrq_requested = 0;
if (ch && time_before(jiffies, sysrq_timeout)) { if (ch && time_before(jiffies, sysrq_timeout)) {
spin_unlock_irqrestore(&port->sc_port.lock, flags); spin_unlock_irqrestore(&port->sc_port.lock, flags);
handle_sysrq(ch, NULL); handle_sysrq(ch);
spin_lock_irqsave(&port->sc_port.lock, flags); spin_lock_irqsave(&port->sc_port.lock, flags);
/* ignore actual sysrq command char */ /* ignore actual sysrq command char */
continue; continue;

View file

@ -1834,7 +1834,7 @@ static int ftdi_process_packet(struct tty_struct *tty,
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < len; i++, ch++) { for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, flag); tty_insert_flip_char(tty, *ch, flag);
} }
} else { } else {

View file

@ -343,7 +343,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb)
tty_insert_flip_string(tty, ch, urb->actual_length); tty_insert_flip_string(tty, ch, urb->actual_length);
else { else {
for (i = 0; i < urb->actual_length; i++, ch++) { for (i = 0; i < urb->actual_length; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, TTY_NORMAL); tty_insert_flip_char(tty, *ch, TTY_NORMAL);
} }
} }
@ -448,12 +448,11 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle); EXPORT_SYMBOL_GPL(usb_serial_generic_unthrottle);
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
int usb_serial_handle_sysrq_char(struct tty_struct *tty, int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
struct usb_serial_port *port, unsigned int ch)
{ {
if (port->sysrq && port->port.console) { if (port->sysrq && port->port.console) {
if (ch && time_before(jiffies, port->sysrq)) { if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, tty); handle_sysrq(ch);
port->sysrq = 0; port->sysrq = 0;
return 1; return 1;
} }
@ -462,8 +461,7 @@ int usb_serial_handle_sysrq_char(struct tty_struct *tty,
return 0; return 0;
} }
#else #else
int usb_serial_handle_sysrq_char(struct tty_struct *tty, int usb_serial_handle_sysrq_char(struct usb_serial_port *port, unsigned int ch)
struct usb_serial_port *port, unsigned int ch)
{ {
return 0; return 0;
} }

View file

@ -789,7 +789,7 @@ static void pl2303_process_read_urb(struct urb *urb)
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < urb->actual_length; ++i) for (i = 0; i < urb->actual_length; ++i)
if (!usb_serial_handle_sysrq_char(tty, port, data[i])) if (!usb_serial_handle_sysrq_char(port, data[i]))
tty_insert_flip_char(tty, data[i], tty_flag); tty_insert_flip_char(tty, data[i], tty_flag);
} else { } else {
tty_insert_flip_string_fixed_flag(tty, data, tty_flag, tty_insert_flip_string_fixed_flag(tty, data, tty_flag,

View file

@ -672,7 +672,7 @@ static int ssu100_process_packet(struct tty_struct *tty,
if (port->port.console && port->sysrq) { if (port->port.console && port->sysrq) {
for (i = 0; i < len; i++, ch++) { for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, flag); tty_insert_flip_char(tty, *ch, flag);
} }
} else } else

View file

@ -237,7 +237,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
goto again; goto again;
if (sysrq_key != '\0') if (sysrq_key != '\0')
handle_sysrq(sysrq_key, NULL); handle_sysrq(sysrq_key);
} }
static struct xenbus_watch sysrq_watch = { static struct xenbus_watch sysrq_watch = {

View file

@ -33,6 +33,7 @@
#define MWAVE_MINOR 219 /* ACP/Mwave Modem */ #define MWAVE_MINOR 219 /* ACP/Mwave Modem */
#define MPT_MINOR 220 #define MPT_MINOR 220
#define MPT2SAS_MINOR 221 #define MPT2SAS_MINOR 221
#define UINPUT_MINOR 223
#define HPET_MINOR 228 #define HPET_MINOR 228
#define FUSE_MINOR 229 #define FUSE_MINOR 229
#define KVM_MINOR 232 #define KVM_MINOR 232

View file

@ -465,7 +465,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
#ifdef SUPPORT_SYSRQ #ifdef SUPPORT_SYSRQ
if (port->sysrq) { if (port->sysrq) {
if (ch && time_before(jiffies, port->sysrq)) { if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, port->state->port.tty); handle_sysrq(ch);
port->sysrq = 0; port->sysrq = 0;
return 1; return 1;
} }

View file

@ -15,9 +15,7 @@
#define _LINUX_SYSRQ_H #define _LINUX_SYSRQ_H
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/types.h>
struct pt_regs;
struct tty_struct;
/* Possible values of bitmask for enabling sysrq functions */ /* Possible values of bitmask for enabling sysrq functions */
/* 0x0001 is reserved for enable everything */ /* 0x0001 is reserved for enable everything */
@ -31,7 +29,7 @@ struct tty_struct;
#define SYSRQ_ENABLE_RTNICE 0x0100 #define SYSRQ_ENABLE_RTNICE 0x0100
struct sysrq_key_op { struct sysrq_key_op {
void (*handler)(int, struct tty_struct *); void (*handler)(int);
char *help_msg; char *help_msg;
char *action_msg; char *action_msg;
int enable_mask; int enable_mask;
@ -44,8 +42,8 @@ struct sysrq_key_op {
* are available -- else NULL's). * are available -- else NULL's).
*/ */
void handle_sysrq(int key, struct tty_struct *tty); void handle_sysrq(int key);
void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); void __handle_sysrq(int key, bool check_mask);
int register_sysrq_key(int key, struct sysrq_key_op *op); int register_sysrq_key(int key, struct sysrq_key_op *op);
int unregister_sysrq_key(int key, struct sysrq_key_op *op); int unregister_sysrq_key(int key, struct sysrq_key_op *op);
struct sysrq_key_op *__sysrq_get_key_op(int key); struct sysrq_key_op *__sysrq_get_key_op(int key);
@ -54,7 +52,11 @@ int sysrq_toggle_support(int enable_mask);
#else #else
static inline void handle_sysrq(int key, struct tty_struct *tty) static inline void handle_sysrq(int key)
{
}
static inline void __handle_sysrq(int key, bool check_mask)
{ {
} }

View file

@ -37,7 +37,6 @@
#define UINPUT_VERSION 3 #define UINPUT_VERSION 3
#ifdef __KERNEL__ #ifdef __KERNEL__
#define UINPUT_MINOR 223
#define UINPUT_NAME "uinput" #define UINPUT_NAME "uinput"
#define UINPUT_BUFFER_SIZE 16 #define UINPUT_BUFFER_SIZE 16
#define UINPUT_NUM_REQUESTS 16 #define UINPUT_NUM_REQUESTS 16

View file

@ -342,8 +342,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
extern void usb_serial_generic_process_read_urb(struct urb *urb); extern void usb_serial_generic_process_read_urb(struct urb *urb);
extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,
void *dest, size_t size); void *dest, size_t size);
extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port,
struct usb_serial_port *port,
unsigned int ch); unsigned int ch);
extern int usb_serial_handle_break(struct usb_serial_port *port); extern int usb_serial_handle_break(struct usb_serial_port *port);

View file

@ -741,7 +741,7 @@ static struct console kgdbcons = {
}; };
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_dbg(int key, struct tty_struct *tty) static void sysrq_handle_dbg(int key)
{ {
if (!dbg_io_ops) { if (!dbg_io_ops) {
printk(KERN_CRIT "ERROR: No KGDB I/O module available\n"); printk(KERN_CRIT "ERROR: No KGDB I/O module available\n");

View file

@ -1929,7 +1929,7 @@ static int kdb_sr(int argc, const char **argv)
if (argc != 1) if (argc != 1)
return KDB_ARGCOUNT; return KDB_ARGCOUNT;
kdb_trap_printk++; kdb_trap_printk++;
__handle_sysrq(*argv[1], NULL, 0); __handle_sysrq(*argv[1], false);
kdb_trap_printk--; kdb_trap_printk--;
return 0; return 0;

View file

@ -24,7 +24,7 @@ static void do_poweroff(struct work_struct *dummy)
static DECLARE_WORK(poweroff_work, do_poweroff); static DECLARE_WORK(poweroff_work, do_poweroff);
static void handle_poweroff(int key, struct tty_struct *tty) static void handle_poweroff(int key)
{ {
/* run sysrq poweroff on boot cpu */ /* run sysrq poweroff on boot cpu */
schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work); schedule_work_on(cpumask_first(cpu_online_mask), &poweroff_work);