Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188044
b: refs/heads/master
c: ec62e1c
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Mar 9, 2010
1 parent 2aca183 commit 5bcff3e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce67eef6a112bb283c6db39f9195800f31f5599a
refs/heads/master: ec62e1c8dd2f9b2a833b48d4a2f58f0c5e07384c
24 changes: 8 additions & 16 deletions trunk/drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,8 @@ static int __init i8042_probe(struct platform_device *dev)
{
int error;

i8042_platform_device = dev;

error = i8042_controller_selftest();
if (error)
return error;
Expand Down Expand Up @@ -1421,6 +1423,7 @@ static int __init i8042_probe(struct platform_device *dev)
i8042_free_aux_ports(); /* in case KBD failed but AUX not */
i8042_free_irqs();
i8042_controller_reset();
i8042_platform_device = NULL;

return error;
}
Expand All @@ -1430,6 +1433,7 @@ static int __devexit i8042_remove(struct platform_device *dev)
i8042_unregister_ports();
i8042_free_irqs();
i8042_controller_reset();
i8042_platform_device = NULL;

return 0;
}
Expand All @@ -1448,6 +1452,7 @@ static struct platform_driver i8042_driver = {

static int __init i8042_init(void)
{
struct platform_device *pdev;
int err;

dbg_init();
Expand All @@ -1460,31 +1465,18 @@ static int __init i8042_init(void)
if (err)
goto err_platform_exit;

i8042_platform_device = platform_device_alloc("i8042", -1);
if (!i8042_platform_device) {
err = -ENOMEM;
pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0);
if (IS_ERR(pdev)) {
err = PTR_ERR(pdev);
goto err_platform_exit;
}

err = platform_device_add(i8042_platform_device);
if (err)
goto err_free_device;

err = platform_driver_probe(&i8042_driver, i8042_probe);
if (err)
goto err_del_device;

panic_blink = i8042_panic_blink;

return 0;

err_del_device:
platform_device_del(i8042_platform_device);
err_free_device:
platform_device_put(i8042_platform_device);
err_platform_exit:
i8042_platform_exit();

return err;
}

Expand Down

0 comments on commit 5bcff3e

Please sign in to comment.