From: Axel Lin Date: Fri, 2 Dec 2011 03:12:40 +0000 (+1100) Subject: leds: convert leds-dac124s085 to module_spi_driver X-Git-Tag: next-20111207~2^2~109 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0fc1388e799f3f6191ec9bb829003a5c6c648790;p=karo-tx-linux.git leds: convert leds-dac124s085 to module_spi_driver Factor out some boilerplate code for spi driver registration into module_spi_driver. Signed-off-by: Axel Lin Cc: Haojian Zhuang Cc: Mark Brown Cc: Richard Purdie Cc: Michael Hennerich Cc: Mike Rapoport Acked-by: Guennadi Liakhovetski Signed-off-by: Andrew Morton --- diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c index 31cf0d60a9a5..d56c14269ff0 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 "); MODULE_DESCRIPTION("DAC124S085 LED driver");