aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2007-02-28 23:51:19 -0500
committerDmitry Torokhov <dtor@insightbb.com>2007-02-28 23:51:19 -0500
commit3acaf540a33199141695f2e2fcfa8829053159bf (patch)
tree8cc083df919078ec15665cfc34bc977f6996e939 /drivers/input/keyboard
parent969111e900226a8dbd1f596f34c09eecd20afc7d (diff)
Input: HIL - various fixes for HIL drivers
- mark some structures const or __read_mostly - hilkbd.c: fix uninitialized spinlock in HIL keyboard driver - hil_mlc.c: use USEC_PER_SEC instead of 1000000 - hp_sdc: bugfix for request_irq()/free_irq() parameters, this prevented multiple load/unload cycles as module Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/hil_kbd.c8
-rw-r--r--drivers/input/keyboard/hilkbd.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index 7cc9728b04df..7143f37927cd 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -51,7 +51,7 @@ MODULE_LICENSE("Dual BSD/GPL");
51 51
52#define HIL_KBD_SET1_UPBIT 0x01 52#define HIL_KBD_SET1_UPBIT 0x01
53#define HIL_KBD_SET1_SHIFT 1 53#define HIL_KBD_SET1_SHIFT 1
54static unsigned int hil_kbd_set1[HIL_KEYCODES_SET1_TBLSIZE] = 54static unsigned int hil_kbd_set1[HIL_KEYCODES_SET1_TBLSIZE] __read_mostly =
55 { HIL_KEYCODES_SET1 }; 55 { HIL_KEYCODES_SET1 };
56 56
57#define HIL_KBD_SET2_UPBIT 0x01 57#define HIL_KBD_SET2_UPBIT 0x01
@@ -60,10 +60,10 @@ static unsigned int hil_kbd_set1[HIL_KEYCODES_SET1_TBLSIZE] =
60 60
61#define HIL_KBD_SET3_UPBIT 0x80 61#define HIL_KBD_SET3_UPBIT 0x80
62#define HIL_KBD_SET3_SHIFT 0 62#define HIL_KBD_SET3_SHIFT 0
63static unsigned int hil_kbd_set3[HIL_KEYCODES_SET3_TBLSIZE] = 63static unsigned int hil_kbd_set3[HIL_KEYCODES_SET3_TBLSIZE] __read_mostly =
64 { HIL_KEYCODES_SET3 }; 64 { HIL_KEYCODES_SET3 };
65 65
66static char hil_language[][16] = { HIL_LOCALE_MAP }; 66static const char hil_language[][16] = { HIL_LOCALE_MAP };
67 67
68struct hil_kbd { 68struct hil_kbd {
69 struct input_dev *dev; 69 struct input_dev *dev;
@@ -368,7 +368,7 @@ static struct serio_device_id hil_kbd_ids[] = {
368 { 0 } 368 { 0 }
369}; 369};
370 370
371struct serio_driver hil_kbd_serio_drv = { 371static struct serio_driver hil_kbd_serio_drv = {
372 .driver = { 372 .driver = {
373 .name = "hil_kbd", 373 .name = "hil_kbd",
374 }, 374 },
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c
index 4de4dc297d50..230f5db30f0f 100644
--- a/drivers/input/keyboard/hilkbd.c
+++ b/drivers/input/keyboard/hilkbd.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 1998 Philip Blundell <philb@gnu.org> 4 * Copyright (C) 1998 Philip Blundell <philb@gnu.org>
5 * Copyright (C) 1999 Matthew Wilcox <willy@bofh.ai> 5 * Copyright (C) 1999 Matthew Wilcox <willy@bofh.ai>
6 * Copyright (C) 1999-2006 Helge Deller <deller@gmx.de> 6 * Copyright (C) 1999-2007 Helge Deller <deller@gmx.de>
7 * 7 *
8 * Very basic HP Human Interface Loop (HIL) driver. 8 * Very basic HP Human Interface Loop (HIL) driver.
9 * This driver handles the keyboard on HP300 (m68k) and on some 9 * This driver handles the keyboard on HP300 (m68k) and on some
@@ -89,7 +89,7 @@ MODULE_LICENSE("GPL v2");
89#define HIL_READKBDSADR 0xF9 89#define HIL_READKBDSADR 0xF9
90#define HIL_WRITEKBDSADR 0xE9 90#define HIL_WRITEKBDSADR 0xE9
91 91
92static unsigned int hphilkeyb_keycode[HIL_KEYCODES_SET1_TBLSIZE] = 92static unsigned int hphilkeyb_keycode[HIL_KEYCODES_SET1_TBLSIZE] __read_mostly =
93 { HIL_KEYCODES_SET1 }; 93 { HIL_KEYCODES_SET1 };
94 94
95/* HIL structure */ 95/* HIL structure */
@@ -211,6 +211,7 @@ hil_keyb_init(void)
211 return -ENODEV; /* already initialized */ 211 return -ENODEV; /* already initialized */
212 } 212 }
213 213
214 spin_lock_init(&hil_dev.lock);
214 hil_dev.dev = input_allocate_device(); 215 hil_dev.dev = input_allocate_device();
215 if (!hil_dev.dev) 216 if (!hil_dev.dev)
216 return -ENOMEM; 217 return -ENOMEM;