aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 14:13:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 14:13:54 -0400
commita818d8e43147f40864363456b37a00b819439307 (patch)
treec0a5139116747c2240f94c024e247a4efd1791c6 /drivers/input/serio/i8042.c
parentf901e753923192a7793e5d7591e2c03dcb252d68 (diff)
parent31968ecf584330b51a25b7bf881c2b632a02a3fb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Input: ALPS - fix stuck buttons on some touchpads Input: wm831x-on - convert to use genirq Input: ads7846 - add wakeup support Input: appletouch - fix integer overflow issue Input: ad7877 - increase pen up imeout Input: ads7846 - add support for AD7843 parts Input: bf54x-keys - fix system hang when pressing a key Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Input: remove BKL, fix input_open_file() locking Input: serio_raw - remove BKL Input: mousedev - remove BKL Input: add driver for TWL4030 vibrator device Input: enable remote wakeup for PNP i8042 keyboard ports Input: scancode in get/set_keycodes should be unsigned Input: i8042 - use platfrom_create_bundle() helper Input: wacom - merge out and in prox events Input: gamecon - fix off by one range check Input: wacom - replace WACOM_PKGLEN_PENABLED
Diffstat (limited to 'drivers/input/serio/i8042.c')
-rw-r--r--drivers/input/serio/i8042.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index ff4d77c4de11..9302ba0e48f8 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1386,6 +1386,8 @@ static int __init i8042_probe(struct platform_device *dev)
1386{ 1386{
1387 int error; 1387 int error;
1388 1388
1389 i8042_platform_device = dev;
1390
1389 error = i8042_controller_selftest(); 1391 error = i8042_controller_selftest();
1390 if (error) 1392 if (error)
1391 return error; 1393 return error;
@@ -1421,6 +1423,7 @@ static int __init i8042_probe(struct platform_device *dev)
1421 i8042_free_aux_ports(); /* in case KBD failed but AUX not */ 1423 i8042_free_aux_ports(); /* in case KBD failed but AUX not */
1422 i8042_free_irqs(); 1424 i8042_free_irqs();
1423 i8042_controller_reset(); 1425 i8042_controller_reset();
1426 i8042_platform_device = NULL;
1424 1427
1425 return error; 1428 return error;
1426} 1429}
@@ -1430,6 +1433,7 @@ static int __devexit i8042_remove(struct platform_device *dev)
1430 i8042_unregister_ports(); 1433 i8042_unregister_ports();
1431 i8042_free_irqs(); 1434 i8042_free_irqs();
1432 i8042_controller_reset(); 1435 i8042_controller_reset();
1436 i8042_platform_device = NULL;
1433 1437
1434 return 0; 1438 return 0;
1435} 1439}
@@ -1448,6 +1452,7 @@ static struct platform_driver i8042_driver = {
1448 1452
1449static int __init i8042_init(void) 1453static int __init i8042_init(void)
1450{ 1454{
1455 struct platform_device *pdev;
1451 int err; 1456 int err;
1452 1457
1453 dbg_init(); 1458 dbg_init();
@@ -1460,31 +1465,18 @@ static int __init i8042_init(void)
1460 if (err) 1465 if (err)
1461 goto err_platform_exit; 1466 goto err_platform_exit;
1462 1467
1463 i8042_platform_device = platform_device_alloc("i8042", -1); 1468 pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
1464 if (!i8042_platform_device) { 1469 if (IS_ERR(pdev)) {
1465 err = -ENOMEM; 1470 err = PTR_ERR(pdev);
1466 goto err_platform_exit; 1471 goto err_platform_exit;
1467 } 1472 }
1468 1473
1469 err = platform_device_add(i8042_platform_device);
1470 if (err)
1471 goto err_free_device;
1472
1473 err = platform_driver_probe(&i8042_driver, i8042_probe);
1474 if (err)
1475 goto err_del_device;
1476
1477 panic_blink = i8042_panic_blink; 1474 panic_blink = i8042_panic_blink;
1478 1475
1479 return 0; 1476 return 0;
1480 1477
1481 err_del_device:
1482 platform_device_del(i8042_platform_device);
1483 err_free_device:
1484 platform_device_put(i8042_platform_device);
1485 err_platform_exit: 1478 err_platform_exit:
1486 i8042_platform_exit(); 1479 i8042_platform_exit();
1487
1488 return err; 1480 return err;
1489} 1481}
1490 1482