diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2014-11-16 21:16:12 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-11-16 21:23:12 -0500 |
commit | 5447326ff7e42ae36b85caedb2a787ff4db646f4 (patch) | |
tree | 8e6bc920cfbac13c1c5340cc7ed7e80a6b4876cc /drivers/input/keyboard | |
parent | b1cfa7b4388285c0f0b486f152ab0cb18612c779 (diff) |
Input: atkbd - correct MSC_SCAN events for force_release keys
Without the change either no scancode would be reported on release of
force_release keys, or - if the key is marked as force_release erroneously
- the release event and the scancode would be reported in separate reports
to the input layer.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 6f5d79569136..e27a25892db4 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
456 | 456 | ||
457 | keycode = atkbd->keycode[code]; | 457 | keycode = atkbd->keycode[code]; |
458 | 458 | ||
459 | if (keycode != ATKBD_KEY_NULL) | 459 | if (!(atkbd->release && test_bit(code, atkbd->force_release_mask))) |
460 | input_event(dev, EV_MSC, MSC_SCAN, code); | 460 | if (keycode != ATKBD_KEY_NULL) |
461 | input_event(dev, EV_MSC, MSC_SCAN, code); | ||
461 | 462 | ||
462 | switch (keycode) { | 463 | switch (keycode) { |
463 | case ATKBD_KEY_NULL: | 464 | case ATKBD_KEY_NULL: |
@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
511 | input_sync(dev); | 512 | input_sync(dev); |
512 | 513 | ||
513 | if (value && test_bit(code, atkbd->force_release_mask)) { | 514 | if (value && test_bit(code, atkbd->force_release_mask)) { |
515 | input_event(dev, EV_MSC, MSC_SCAN, code); | ||
514 | input_report_key(dev, keycode, 0); | 516 | input_report_key(dev, keycode, 0); |
515 | input_sync(dev); | 517 | input_sync(dev); |
516 | } | 518 | } |