aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 18:35:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 18:35:08 -0400
commitf5b63ac0f77ecab46796ba5d368ea5dd51834e6e (patch)
tree66788b3327afa62aa7f8fe05951945a2ee1e9e4e /drivers/tty
parent98f486f18d16e2214728d101ed8b6a12dce75539 (diff)
parent57961e3ba72f4a8a1aa52e978020ecc2ca03a79f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "First round of updates for the input subsystem. You will get a new touchsreen driver for Cypress 4th generation devices, a driver for a special controller implementing PS/2 protocol in OLPC devices, and a driver for power key for SiRFprimaII PWRC. HID and bcm5497 now support for the 2013 MacBook Air. EVIOCGKEY and the rest of evdev ioctls now flush events of matching type from the client's event queue so that clients can be sure any events received after issuing EVIOCG* ioctl are new events. And a host of cleanups and improvements in other drivers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits) Input: cyttsp4 - kfree xfer_buf on error path in probe() Input: tps6507x-ts - select INPUT_POLLDEV Input: bcm5974 - add support for the 2013 MacBook Air HID: apple: Add support for the 2013 Macbook Air Input: cyttsp4 - leak on error path in probe() Input: cyttsp4 - silence NULL dereference warning Input: cyttsp4 - silence shift wrap warning Input: tps6507x-ts - convert to polled input device infrastructure ARM: davinci: da850-evm: remove vref from touchscreen platform data Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devices Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices Input: cyttsp - I2C driver split into two modules Input: add OLPC AP-SP driver Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe() Input: tps6507x-ts - remove vref from platform data Input: tps6507x-ts - use bool for booleans Input: tps6507x-ts - remove bogus unreachable code Input: samsung-keypad - let device core setup the default pin configuration Input: wacom_i2c - implement hovering capability ...
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/sysrq.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 5f68f2cfdfd0..d5cc3acecfd3 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -44,6 +44,7 @@
44#include <linux/uaccess.h> 44#include <linux/uaccess.h>
45#include <linux/moduleparam.h> 45#include <linux/moduleparam.h>
46#include <linux/jiffies.h> 46#include <linux/jiffies.h>
47#include <linux/syscalls.h>
47 48
48#include <asm/ptrace.h> 49#include <asm/ptrace.h>
49#include <asm/irq_regs.h> 50#include <asm/irq_regs.h>
@@ -586,6 +587,7 @@ struct sysrq_state {
586 587
587 /* reset sequence handling */ 588 /* reset sequence handling */
588 bool reset_canceled; 589 bool reset_canceled;
590 bool reset_requested;
589 unsigned long reset_keybit[BITS_TO_LONGS(KEY_CNT)]; 591 unsigned long reset_keybit[BITS_TO_LONGS(KEY_CNT)];
590 int reset_seq_len; 592 int reset_seq_len;
591 int reset_seq_cnt; 593 int reset_seq_cnt;
@@ -624,18 +626,26 @@ static void sysrq_parse_reset_sequence(struct sysrq_state *state)
624 state->reset_seq_version = sysrq_reset_seq_version; 626 state->reset_seq_version = sysrq_reset_seq_version;
625} 627}
626 628
627static void sysrq_do_reset(unsigned long dummy) 629static void sysrq_do_reset(unsigned long _state)
628{ 630{
629 __handle_sysrq(sysrq_xlate[KEY_B], false); 631 struct sysrq_state *state = (struct sysrq_state *) _state;
632
633 state->reset_requested = true;
634
635 sys_sync();
636 kernel_restart(NULL);
630} 637}
631 638
632static void sysrq_handle_reset_request(struct sysrq_state *state) 639static void sysrq_handle_reset_request(struct sysrq_state *state)
633{ 640{
641 if (state->reset_requested)
642 __handle_sysrq(sysrq_xlate[KEY_B], false);
643
634 if (sysrq_reset_downtime_ms) 644 if (sysrq_reset_downtime_ms)
635 mod_timer(&state->keyreset_timer, 645 mod_timer(&state->keyreset_timer,
636 jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms)); 646 jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms));
637 else 647 else
638 sysrq_do_reset(0); 648 sysrq_do_reset((unsigned long)state);
639} 649}
640 650
641static void sysrq_detect_reset_sequence(struct sysrq_state *state, 651static void sysrq_detect_reset_sequence(struct sysrq_state *state,
@@ -837,7 +847,8 @@ static int sysrq_connect(struct input_handler *handler,
837 sysrq->handle.handler = handler; 847 sysrq->handle.handler = handler;
838 sysrq->handle.name = "sysrq"; 848 sysrq->handle.name = "sysrq";
839 sysrq->handle.private = sysrq; 849 sysrq->handle.private = sysrq;
840 setup_timer(&sysrq->keyreset_timer, sysrq_do_reset, 0); 850 setup_timer(&sysrq->keyreset_timer,
851 sysrq_do_reset, (unsigned long)sysrq);
841 852
842 error = input_register_handle(&sysrq->handle); 853 error = input_register_handle(&sysrq->handle);
843 if (error) { 854 if (error) {