Commit 5447326f authored by Stefan Brüns's avatar Stefan Brüns Committed by Dmitry Torokhov

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: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent b1cfa7b4
...@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, ...@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
keycode = atkbd->keycode[code]; keycode = atkbd->keycode[code];
if (keycode != ATKBD_KEY_NULL) if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
input_event(dev, EV_MSC, MSC_SCAN, code); if (keycode != ATKBD_KEY_NULL)
input_event(dev, EV_MSC, MSC_SCAN, code);
switch (keycode) { switch (keycode) {
case ATKBD_KEY_NULL: case ATKBD_KEY_NULL:
...@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, ...@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
input_sync(dev); input_sync(dev);
if (value && test_bit(code, atkbd->force_release_mask)) { if (value && test_bit(code, atkbd->force_release_mask)) {
input_event(dev, EV_MSC, MSC_SCAN, code);
input_report_key(dev, keycode, 0); input_report_key(dev, keycode, 0);
input_sync(dev); input_sync(dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment