lkml.org 
[lkml]   [2011]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH TRIVIAL 1/5] Input: keyboard: use macro module_platform_driver()
On Tuesday, November 22, 2011 2:01 AM, JJ Ding wrote:
>
> Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
> save some platform_driver boilerplate code. Use it.
>
> Signed-off-by: JJ Ding <dgdunix@gmail.com>
> ---
> drivers/input/keyboard/ep93xx_keypad.c | 14 +-------------
>
> diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
> index 4662c5d..0ba69f3 100644
> --- a/drivers/input/keyboard/ep93xx_keypad.c
> +++ b/drivers/input/keyboard/ep93xx_keypad.c
> @@ -390,19 +390,7 @@ static struct platform_driver ep93xx_keypad_driver = {
> .suspend = ep93xx_keypad_suspend,
> .resume = ep93xx_keypad_resume,
> };
> -
> -static int __init ep93xx_keypad_init(void)
> -{
> - return platform_driver_register(&ep93xx_keypad_driver);
> -}
> -
> -static void __exit ep93xx_keypad_exit(void)
> -{
> - platform_driver_unregister(&ep93xx_keypad_driver);
> -}
> -
> -module_init(ep93xx_keypad_init);
> -module_exit(ep93xx_keypad_exit);
> +module_platform_driver(ep93xx_keypad_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("H Hartley Sweeten <hsweeten@visionengravers.com>");

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Thanks!
\
 
 \ /
  Last update: 2011-11-22 21:19    [W:2.021 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site