Commit 54c1ae21 authored by Scott Zuk's avatar Scott Zuk Committed by Vojtech Pavlik

input: Restore LED state in atkbd.c after resume.

parent d5d1818a
...@@ -798,6 +798,7 @@ static int atkbd_reconnect(struct serio *serio) ...@@ -798,6 +798,7 @@ static int atkbd_reconnect(struct serio *serio)
{ {
struct atkbd *atkbd = serio->private; struct atkbd *atkbd = serio->private;
struct serio_dev *dev = serio->dev; struct serio_dev *dev = serio->dev;
unsigned char param[1];
if (!dev) { if (!dev) {
printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n"); printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
...@@ -805,11 +806,19 @@ static int atkbd_reconnect(struct serio *serio) ...@@ -805,11 +806,19 @@ static int atkbd_reconnect(struct serio *serio)
} }
if (atkbd->write) { if (atkbd->write) {
param[0] = (test_bit(LED_SCROLLL, atkbd->dev.led) ? 1 : 0)
| (test_bit(LED_NUML, atkbd->dev.led) ? 2 : 0)
| (test_bit(LED_CAPSL, atkbd->dev.led) ? 4 : 0);
if (atkbd_probe(atkbd)) if (atkbd_probe(atkbd))
return -1; return -1;
if (atkbd->set != atkbd_set_3(atkbd)) if (atkbd->set != atkbd_set_3(atkbd))
return -1; return -1;
atkbd_enable(atkbd); atkbd_enable(atkbd);
if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
return -1;
} }
return 0; return 0;
......
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