summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2006-03-14 08:09:52 +0300
committerDmitry Torokhov <dtor_core@ameritech.net>2006-03-14 08:09:52 +0300
commit9b104c12f12d6b9923e3b779a1f3e45efab7bae6 (patch)
tree0aedc884d7a7e95b2e50ea7aabc256c18243c4fe /drivers/input
parent50a598de407ea2e2f4e20bc34eeefe8bb5a8071e (diff)
downloadlinux-9b104c12f12d6b9923e3b779a1f3e45efab7bae6.tar.xz
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')
-rw-r--r--drivers/input/keyboard/atkbd.c12
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,
if (atkbd->translated) {
if (atkbd->emul ||
- !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 ||
- code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA ||
- (code == ATKBD_RET_ERR && !atkbd->err_xl) ||
- (code == ATKBD_RET_BAT && !atkbd->bat_xl))) {
+ (code != ATKBD_RET_EMUL0 && code != ATKBD_RET_EMUL1 &&
+ code != ATKBD_RET_HANGUEL && code != ATKBD_RET_HANJA &&
+ (code != ATKBD_RET_ERR || atkbd->err_xl) &&
+ (code != ATKBD_RET_BAT || atkbd->bat_xl))) {
atkbd->release = code >> 7;
code &= 0x7f;
}
if (!atkbd->emul) {
if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f))
- atkbd->bat_xl = !atkbd->release;
+ atkbd->bat_xl = !(data >> 7);
if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f))
- atkbd->err_xl = !atkbd->release;
+ atkbd->err_xl = !(data >> 7);
}
}