[PATCH 8/16] Allow setkeycodes work again

Dmitry Torokhov
2004-12-29T07:41:34Z

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

ChangeSet@1.1967, 2004-11-20 02:27:37-05:00, dtor_core@ameritech.net
Input: atkbd - fix keycode table size initialization that got broken
by my changes that exported 'set' and other settings via sysfs.
setkeycodes should work again now.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

atkbd.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

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

diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
--- a/drivers/input/keyboard/atkbd.c 2004-12-29 01:48:53 -05:00
+++ b/drivers/input/keyboard/atkbd.c 2004-12-29 01:48:53 -05:00
@@ -756,6 +756,10 @@
set_bit(BTN_MIDDLE, atkbd->dev.keybit);
}

+ atkbd->dev.keycode = atkbd->keycode;
+ atkbd->dev.keycodesize = sizeof(unsigned char);
+ atkbd->dev.keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
+
for (i = 0; i < 512; i++)
if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL)
set_bit(atkbd->keycode[i], atkbd->dev.keybit);
@@ -803,10 +807,6 @@

if (atkbd->softrepeat)
atkbd->softraw = 1;
-
- atkbd->dev.keycode = atkbd->keycode;
- atkbd->dev.keycodesize = sizeof(unsigned char);
- atkbd->dev.keycodemax = ARRAY_SIZE(atkbd_set2_keycode);

serio->private = atkbd;