diff options
author | JJ Ding <dgdunix@gmail.com> | 2011-11-29 11:08:40 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-30 23:41:42 -0800 |
commit | 840a746be2beddd2ada0e5ba772147316d071f25 (patch) | |
tree | 3c078fea13106e83cbcb910aaf8e59046962e452 /drivers/input/misc/rotary_encoder.c | |
parent | 5146c84f87c8aa3d115cea0d77ed3553df426752 (diff) | |
download | linux-840a746be2beddd2ada0e5ba772147316d071f25.tar.gz linux-840a746be2beddd2ada0e5ba772147316d071f25.tar.bz2 linux-840a746be2beddd2ada0e5ba772147316d071f25.zip |
Input: misc - 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/misc/rotary_encoder.c')
-rw-r--r-- | drivers/input/misc/rotary_encoder.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 2be21694fac1..f07f784198b9 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -284,19 +284,7 @@ static struct platform_driver rotary_encoder_driver = { .owner = THIS_MODULE, } }; - -static int __init rotary_encoder_init(void) -{ - return platform_driver_register(&rotary_encoder_driver); -} - -static void __exit rotary_encoder_exit(void) -{ - platform_driver_unregister(&rotary_encoder_driver); -} - -module_init(rotary_encoder_init); -module_exit(rotary_encoder_exit); +module_platform_driver(rotary_encoder_driver); MODULE_ALIAS("platform:" DRV_NAME); MODULE_DESCRIPTION("GPIO rotary encoder driver"); |