[PATCH 37/44] Restore LED state in atkbd.c after resume

From: Vojtech Pavlik
Date: Tue Mar 16 2004 - 10:58:35 EST


You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================

ChangeSet@xxxxxxxxxxxx, 2004-03-08 14:09:15+01:00, szuk@xxxxxxxxxxxxxxx
input: Restore LED state in atkbd.c after resume.


atkbd.c | 9 +++++++++
1 files changed, 9 insertions(+)

===================================================================

diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
--- a/drivers/input/keyboard/atkbd.c Tue Mar 16 13:17:49 2004
+++ b/drivers/input/keyboard/atkbd.c Tue Mar 16 13:17:49 2004
@@ -798,6 +798,7 @@
{
struct atkbd *atkbd = serio->private;
struct serio_dev *dev = serio->dev;
+ unsigned char param[1];

if (!dev) {
printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
@@ -805,11 +806,19 @@
}

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))
return -1;
if (atkbd->set != atkbd_set_3(atkbd))
return -1;
+
atkbd_enable(atkbd);
+
+ if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
+ return -1;
}

return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/