diff options
author | JJ Ding <dgdunix@gmail.com> | 2011-11-29 20:08:41 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-01 08:41:42 +0100 |
commit | 4fcdeac5acf4a7a81efc409c02a79a76fa339c27 (patch) | |
tree | 3dec82bc2c8853f06a2f9de2c46f1d330d5a844a /drivers/input/mouse/amimouse.c | |
parent | Input: misc - use macro module_platform_driver() (diff) | |
download | linux-4fcdeac5acf4a7a81efc409c02a79a76fa339c27.tar.xz linux-4fcdeac5acf4a7a81efc409c02a79a76fa339c27.zip |
Input: mouse - use macro module_platform_driver()
Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
save some platform_driver boilerplate code. Use it.
Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/amimouse.c')
-rw-r--r-- | drivers/input/mouse/amimouse.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index ff5f61a0fd3a..39be7b82c046 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c @@ -140,25 +140,13 @@ static int __exit amimouse_remove(struct platform_device *pdev) } static struct platform_driver amimouse_driver = { + .probe = amimouse_probe, .remove = __exit_p(amimouse_remove), .driver = { .name = "amiga-mouse", .owner = THIS_MODULE, }, }; - -static int __init amimouse_init(void) -{ - return platform_driver_probe(&amimouse_driver, amimouse_probe); -} - -module_init(amimouse_init); - -static void __exit amimouse_exit(void) -{ - platform_driver_unregister(&amimouse_driver); -} - -module_exit(amimouse_exit); +module_platform_driver(amimouse_driver); MODULE_ALIAS("platform:amiga-mouse"); |