From 5ee07423b84d0c93fc09c111fbeb60fda496e6f0 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 8 Dec 2011 15:42:18 +1100 Subject: [PATCH] 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 --- drivers/leds/leds-dac124s085.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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"); -- 2.39.5