diff options
author | Vojtech Pavlik <vojtech@suse.cz> | 2006-03-14 00:09:52 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-03-14 00:09:52 -0500 |
commit | 9b104c12f12d6b9923e3b779a1f3e45efab7bae6 (patch) | |
tree | 0aedc884d7a7e95b2e50ea7aabc256c18243c4fe /drivers/input/keyboard | |
parent | 50a598de407ea2e2f4e20bc34eeefe8bb5a8071e (diff) |
Input: atkbd - fix complaints about 'releasing unknown key 0x7f'
Fix bat_xl and err_xl logic causing atkbd to complain about 'unknown
key 0x7f'. Noted by Ben LaHaise.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index b45981870c7a..7d26ab4818b2 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -303,19 +303,19 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
303 | if (atkbd->translated) { | 303 | if (atkbd->translated) { |
304 | 304 | ||
305 | if (atkbd->emul || | 305 | if (atkbd->emul || |
306 | !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 || | 306 | (code != ATKBD_RET_EMUL0 && code != ATKBD_RET_EMUL1 && |
307 | code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA || | 307 | code != ATKBD_RET_HANGUEL && code != ATKBD_RET_HANJA && |
308 | (code == ATKBD_RET_ERR && !atkbd->err_xl) || | 308 | (code != ATKBD_RET_ERR || atkbd->err_xl) && |
309 | (code == ATKBD_RET_BAT && !atkbd->bat_xl))) { | 309 | (code != ATKBD_RET_BAT || atkbd->bat_xl))) { |
310 | atkbd->release = code >> 7; | 310 | atkbd->release = code >> 7; |
311 | code &= 0x7f; | 311 | code &= 0x7f; |
312 | } | 312 | } |
313 | 313 | ||
314 | if (!atkbd->emul) { | 314 | if (!atkbd->emul) { |
315 | if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) | 315 | if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) |
316 | atkbd->bat_xl = !atkbd->release; | 316 | atkbd->bat_xl = !(data >> 7); |
317 | if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f)) | 317 | if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f)) |
318 | atkbd->err_xl = !atkbd->release; | 318 | atkbd->err_xl = !(data >> 7); |
319 | } | 319 | } |
320 | } | 320 | } |
321 | 321 | ||