diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/sysrq.c | 8 | ||||
-rw-r--r-- | drivers/input/misc/pcf8574_keypad.c | 2 | ||||
-rw-r--r-- | drivers/input/touchscreen/ad7877.c | 7 |
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d15630a5830..5d64e3acb000 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -580,8 +580,12 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type, | |||
580 | case KEY_RIGHTALT: | 580 | case KEY_RIGHTALT: |
581 | if (value) | 581 | if (value) |
582 | sysrq_alt = code; | 582 | sysrq_alt = code; |
583 | else if (sysrq_down && code == sysrq_alt_use) | 583 | else { |
584 | sysrq_down = false; | 584 | if (sysrq_down && code == sysrq_alt_use) |
585 | sysrq_down = false; | ||
586 | |||
587 | sysrq_alt = 0; | ||
588 | } | ||
585 | break; | 589 | break; |
586 | 590 | ||
587 | case KEY_SYSRQ: | 591 | case KEY_SYSRQ: |
diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c index 0ac47d2898ec..4b42ffc0532a 100644 --- a/drivers/input/misc/pcf8574_keypad.c +++ b/drivers/input/misc/pcf8574_keypad.c | |||
@@ -69,7 +69,7 @@ static irqreturn_t pcf8574_kp_irq_handler(int irq, void *dev_id) | |||
69 | unsigned char nextstate = read_state(lp); | 69 | unsigned char nextstate = read_state(lp); |
70 | 70 | ||
71 | if (lp->laststate != nextstate) { | 71 | if (lp->laststate != nextstate) { |
72 | int key_down = nextstate <= ARRAY_SIZE(lp->btncode); | 72 | int key_down = nextstate < ARRAY_SIZE(lp->btncode); |
73 | unsigned short keycode = key_down ? | 73 | unsigned short keycode = key_down ? |
74 | lp->btncode[nextstate] : lp->btncode[lp->laststate]; | 74 | lp->btncode[nextstate] : lp->btncode[lp->laststate]; |
75 | 75 | ||
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 0d2d7e54b465..5f0221cffef9 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
@@ -679,6 +679,13 @@ static int __devinit ad7877_probe(struct spi_device *spi) | |||
679 | return -EINVAL; | 679 | return -EINVAL; |
680 | } | 680 | } |
681 | 681 | ||
682 | spi->bits_per_word = 16; | ||
683 | err = spi_setup(spi); | ||
684 | if (err) { | ||
685 | dev_dbg(&spi->dev, "spi master doesn't support 16 bits/word\n"); | ||
686 | return err; | ||
687 | } | ||
688 | |||
682 | ts = kzalloc(sizeof(struct ad7877), GFP_KERNEL); | 689 | ts = kzalloc(sizeof(struct ad7877), GFP_KERNEL); |
683 | input_dev = input_allocate_device(); | 690 | input_dev = input_allocate_device(); |
684 | if (!ts || !input_dev) { | 691 | if (!ts || !input_dev) { |