lkml.org 
[lkml]   [2012]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] staging/android: use module_platform_driver
From
oops forgot to add LKML,

On Fri, Jul 20, 2012 at 10:45 PM, Devendra Naga
<develkernel412222@gmail.com> wrote:
>
> as the init and exit functions just do a platform_driver_register and
> platform_driver_unregister, and nothing else, so its better to
> use the module_platform_driver macro rather replicating its implementation
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> ---
> drivers/staging/android/timed_gpio.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/staging/android/timed_gpio.c
> b/drivers/staging/android/timed_gpio.c
> index 45c522c..e814514 100644
> --- a/drivers/staging/android/timed_gpio.c
> +++ b/drivers/staging/android/timed_gpio.c
> @@ -161,18 +161,7 @@ static struct platform_driver timed_gpio_driver = {
> },
> };
>
> -static int __init timed_gpio_init(void)
> -{
> - return platform_driver_register(&timed_gpio_driver);
> -}
> -
> -static void __exit timed_gpio_exit(void)
> -{
> - platform_driver_unregister(&timed_gpio_driver);
> -}
> -
> -module_init(timed_gpio_init);
> -module_exit(timed_gpio_exit);
> +module_platform_driver(timed_gpio_driver);
>
> MODULE_AUTHOR("Mike Lockwood <lockwood@android.com>");
> MODULE_DESCRIPTION("timed gpio driver");
> --
> 1.7.9.5
>


\
 
 \ /
  Last update: 2012-07-20 19:41    [W:0.019 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site