RE: [PATCH] backlight: convert drivers/video/backlight/* to usemodule_platform_driver()

From: H Hartley Sweeten
Date: Mon Nov 28 2011 - 12:29:00 EST


On Friday, November 25, 2011 7:19 PM, Axel Lin wrote:
> This patch converts the drivers in drivers/video/backlight/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Haojian Zhuang <haojian.zhuang@xxxxxxxxxxx>
> Cc: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
> Cc: Mike Rapoport <mike@xxxxxxxxxxxxxx>
> Cc: Richard Purdie <rpurdie@xxxxxxxxx>
> Cc: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---

[...]

> drivers/video/backlight/ep93xx_bl.c | 12 +-----------

[...]

> diff --git a/drivers/video/backlight/ep93xx_bl.c b/drivers/video/backlight/ep93xx_bl.c
> index c74a6f4..32b9167 100644
> --- a/drivers/video/backlight/ep93xx_bl.c
> +++ b/drivers/video/backlight/ep93xx_bl.c
> @@ -144,17 +144,7 @@ static struct platform_driver ep93xxbl_driver = {
> .resume = ep93xxbl_resume,
> };
>
> -static int __init ep93xxbl_init(void)
> -{
> - return platform_driver_register(&ep93xxbl_driver);
> -}
> -module_init(ep93xxbl_init);
> -
> -static void __exit ep93xxbl_exit(void)
> -{
> - platform_driver_unregister(&ep93xxbl_driver);
> -}
> -module_exit(ep93xxbl_exit);
> +module_platform_driver(ep93xxbl_driver);
>
> MODULE_DESCRIPTION("EP93xx Backlight Driver");
> MODULE_AUTHOR("H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>");

For ep93xx_bl.c:

Acked-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—