diff options
-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 | ||