Re: [PATCH 3/3] leds: Convert leds-dac124s085 to module_spi_driver

From: Guennadi Liakhovetski
Date: Thu Nov 24 2011 - 04:21:56 EST


On Thu, 24 Nov 2011, Axel Lin wrote:

> Factor out some boilerplate code for spi driver registration
> into module_spi_driver.
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>

Acked-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>

Thanks
Guennadi

> ---
> drivers/leds/leds-dac124s085.c | 13 +------------
> 1 files changed, 1 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c
> index 31cf0d6..d56c142 100644
> --- a/drivers/leds/leds-dac124s085.c
> +++ b/drivers/leds/leds-dac124s085.c
> @@ -131,18 +131,7 @@ static struct spi_driver dac124s085_driver = {
> },
> };
>
> -static int __init dac124s085_leds_init(void)
> -{
> - return spi_register_driver(&dac124s085_driver);
> -}
> -
> -static void __exit dac124s085_leds_exit(void)
> -{
> - spi_unregister_driver(&dac124s085_driver);
> -}
> -
> -module_init(dac124s085_leds_init);
> -module_exit(dac124s085_leds_exit);
> +module_spi_driver(dac124s085_driver);
>
> MODULE_AUTHOR("Guennadi Liakhovetski <lg@xxxxxxx>");
> MODULE_DESCRIPTION("DAC124S085 LED driver");
> --
> 1.7.5.4
>
>
>
>

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/