From 109e941843893cb1b4f7bed24c615ba84ce00ff5 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 23 Mar 2012 15:02:30 -0700 Subject: rtc: convert rtc spi drivers to module_spi_driver Factor out some boilerplate code for spi driver registration into module_spi_driver. Signed-off-by: Axel Lin Cc: Mark Jackson Cc: Dennis Aberilla Cc: Nikolaus Voss Cc: "Kim B. Heino" Cc: Raphael Assenat Cc: Chris Verges Cc: Magnus Damm Cc: Atsushi Nemoto Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-ds3234.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/rtc/rtc-ds3234.c') diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c index bbd26228f53..fda707926f0 100644 --- a/drivers/rtc/rtc-ds3234.c +++ b/drivers/rtc/rtc-ds3234.c @@ -173,17 +173,7 @@ static struct spi_driver ds3234_driver = { .remove = __devexit_p(ds3234_remove), }; -static __init int ds3234_init(void) -{ - return spi_register_driver(&ds3234_driver); -} -module_init(ds3234_init); - -static __exit void ds3234_exit(void) -{ - spi_unregister_driver(&ds3234_driver); -} -module_exit(ds3234_exit); +module_spi_driver(ds3234_driver); MODULE_DESCRIPTION("DS3234 SPI RTC driver"); MODULE_AUTHOR("Dennis Aberilla "); -- cgit v1.2.3-70-g09d2