diff options
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4d4985b59abf..1ad8c2ee7dbf 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -208,6 +208,7 @@ struct atkbd { | |||
208 | unsigned char resend; | 208 | unsigned char resend; |
209 | unsigned char release; | 209 | unsigned char release; |
210 | unsigned char bat_xl; | 210 | unsigned char bat_xl; |
211 | unsigned char err_xl; | ||
211 | unsigned int last; | 212 | unsigned int last; |
212 | unsigned long time; | 213 | unsigned long time; |
213 | }; | 214 | }; |
@@ -296,15 +297,18 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data, | |||
296 | if (atkbd->emul || | 297 | if (atkbd->emul || |
297 | !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 || | 298 | !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 || |
298 | code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA || | 299 | code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA || |
299 | code == ATKBD_RET_ERR || | 300 | (code == ATKBD_RET_ERR && !atkbd->err_xl) || |
300 | (code == ATKBD_RET_BAT && !atkbd->bat_xl))) { | 301 | (code == ATKBD_RET_BAT && !atkbd->bat_xl))) { |
301 | atkbd->release = code >> 7; | 302 | atkbd->release = code >> 7; |
302 | code &= 0x7f; | 303 | code &= 0x7f; |
303 | } | 304 | } |
304 | 305 | ||
305 | if (!atkbd->emul && | 306 | if (!atkbd->emul) { |
306 | (code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) | 307 | if ((code & 0x7f) == (ATKBD_RET_BAT & 0x7f)) |
307 | atkbd->bat_xl = !atkbd->release; | 308 | atkbd->bat_xl = !atkbd->release; |
309 | if ((code & 0x7f) == (ATKBD_RET_ERR & 0x7f)) | ||
310 | atkbd->err_xl = !atkbd->release; | ||
311 | } | ||
308 | } | 312 | } |
309 | 313 | ||
310 | switch (code) { | 314 | switch (code) { |