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-max6902.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/rtc/rtc-max6902.c') diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c index 1f6b3cc..36c74d2 100644 --- a/drivers/rtc/rtc-max6902.c +++ b/drivers/rtc/rtc-max6902.c @@ -160,17 +160,7 @@ static struct spi_driver max6902_driver = { .remove = __devexit_p(max6902_remove), }; -static __init int max6902_init(void) -{ - return spi_register_driver(&max6902_driver); -} -module_init(max6902_init); - -static __exit void max6902_exit(void) -{ - spi_unregister_driver(&max6902_driver); -} -module_exit(max6902_exit); +module_spi_driver(max6902_driver); MODULE_DESCRIPTION ("max6902 spi RTC driver"); MODULE_AUTHOR ("Raphael Assenat"); -- cgit v1.1