aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/keyboard.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 99fb070fdbf8..e2011669c7bb 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1293,7 +1293,7 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type,
1293 */ 1293 */
1294static struct input_handle *kbd_connect(struct input_handler *handler, 1294static struct input_handle *kbd_connect(struct input_handler *handler,
1295 struct input_dev *dev, 1295 struct input_dev *dev,
1296 struct input_device_id *id) 1296 const struct input_device_id *id)
1297{ 1297{
1298 struct input_handle *handle; 1298 struct input_handle *handle;
1299 int i; 1299 int i;
@@ -1342,7 +1342,7 @@ static void kbd_start(struct input_handle *handle)
1342 tasklet_enable(&keyboard_tasklet); 1342 tasklet_enable(&keyboard_tasklet);
1343} 1343}
1344 1344
1345static struct input_device_id kbd_ids[] = { 1345static const struct input_device_id kbd_ids[] = {
1346 { 1346 {
1347 .flags = INPUT_DEVICE_ID_MATCH_EVBIT, 1347 .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
1348 .evbit = { BIT(EV_KEY) }, 1348 .evbit = { BIT(EV_KEY) },
@@ -1370,6 +1370,7 @@ static struct input_handler kbd_handler = {
1370int __init kbd_init(void) 1370int __init kbd_init(void)
1371{ 1371{
1372 int i; 1372 int i;
1373 int error;
1373 1374
1374 for (i = 0; i < MAX_NR_CONSOLES; i++) { 1375 for (i = 0; i < MAX_NR_CONSOLES; i++) {
1375 kbd_table[i].ledflagstate = KBD_DEFLEDS; 1376 kbd_table[i].ledflagstate = KBD_DEFLEDS;
@@ -1381,7 +1382,9 @@ int __init kbd_init(void)
1381 kbd_table[i].kbdmode = VC_XLATE; 1382 kbd_table[i].kbdmode = VC_XLATE;
1382 } 1383 }
1383 1384
1384 input_register_handler(&kbd_handler); 1385 error = input_register_handler(&kbd_handler);
1386 if (error)
1387 return error;
1385 1388
1386 tasklet_enable(&keyboard_tasklet); 1389 tasklet_enable(&keyboard_tasklet);
1387 tasklet_schedule(&keyboard_tasklet); 1390 tasklet_schedule(&keyboard_tasklet);