aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/atkbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/atkbd.c')
-rw-r--r--drivers/input/keyboard/atkbd.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 326875be192e..d358ef8623f4 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -153,16 +153,16 @@ static const unsigned short atkbd_unxlate_table[128] = {
153#define ATKBD_RET_HANGEUL 0xf2 153#define ATKBD_RET_HANGEUL 0xf2
154#define ATKBD_RET_ERR 0xff 154#define ATKBD_RET_ERR 0xff
155 155
156#define ATKBD_KEY_UNKNOWN 0 156#define ATKBD_KEY_UNKNOWN 0
157#define ATKBD_KEY_NULL 255 157#define ATKBD_KEY_NULL 255
158 158
159#define ATKBD_SCR_1 254 159#define ATKBD_SCR_1 0xfffe
160#define ATKBD_SCR_2 253 160#define ATKBD_SCR_2 0xfffd
161#define ATKBD_SCR_4 252 161#define ATKBD_SCR_4 0xfffc
162#define ATKBD_SCR_8 251 162#define ATKBD_SCR_8 0xfffb
163#define ATKBD_SCR_CLICK 250 163#define ATKBD_SCR_CLICK 0xfffa
164#define ATKBD_SCR_LEFT 249 164#define ATKBD_SCR_LEFT 0xfff9
165#define ATKBD_SCR_RIGHT 248 165#define ATKBD_SCR_RIGHT 0xfff8
166 166
167#define ATKBD_SPECIAL ATKBD_SCR_RIGHT 167#define ATKBD_SPECIAL ATKBD_SCR_RIGHT
168 168
@@ -177,7 +177,7 @@ static const unsigned short atkbd_unxlate_table[128] = {
177#define ATKBD_XL_HANJA 0x20 177#define ATKBD_XL_HANJA 0x20
178 178
179static const struct { 179static const struct {
180 unsigned char keycode; 180 unsigned short keycode;
181 unsigned char set2; 181 unsigned char set2;
182} atkbd_scroll_keys[] = { 182} atkbd_scroll_keys[] = {
183 { ATKBD_SCR_1, 0xc5 }, 183 { ATKBD_SCR_1, 0xc5 },
@@ -1074,9 +1074,13 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
1074 input_dev->keycodesize = sizeof(unsigned short); 1074 input_dev->keycodesize = sizeof(unsigned short);
1075 input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode); 1075 input_dev->keycodemax = ARRAY_SIZE(atkbd_set2_keycode);
1076 1076
1077 for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) 1077 for (i = 0; i < ATKBD_KEYMAP_SIZE; i++) {
1078 if (atkbd->keycode[i] && atkbd->keycode[i] < ATKBD_SPECIAL) 1078 if (atkbd->keycode[i] != KEY_RESERVED &&
1079 atkbd->keycode[i] != ATKBD_KEY_NULL &&
1080 atkbd->keycode[i] < ATKBD_SPECIAL) {
1079 __set_bit(atkbd->keycode[i], input_dev->keybit); 1081 __set_bit(atkbd->keycode[i], input_dev->keybit);
1082 }
1083 }
1080} 1084}
1081 1085
1082/* 1086/*