From 0abc920116303e81702a38429a1b61a896e02b37 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 23 Mar 2012 15:02:31 -0700 Subject: rtc: convert rtc i2c drivers to module_i2c_driver Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin Cc: Piotr Ziecik Cc: Alessandro Zummo Cc: Scott Wood Cc: Srikanth Srinivasan Cc: Mike Rapoport Cc: Sergey Lapin Cc: Roman Fietze Cc: Herbert Valerio Riedel Cc: Alexander Bigga Cc: Dale Farnsworth Cc: Gregory Hermant Cc: Wolfgang Grandegger Cc: Martyn Welch Cc: Byron Bradley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rtc/rtc-pcf8563.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/rtc/rtc-pcf8563.c') diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 606fdfab34e2..bc0677de1996 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -252,20 +252,9 @@ static struct i2c_driver pcf8563_driver = { .id_table = pcf8563_id, }; -static int __init pcf8563_init(void) -{ - return i2c_add_driver(&pcf8563_driver); -} - -static void __exit pcf8563_exit(void) -{ - i2c_del_driver(&pcf8563_driver); -} +module_i2c_driver(pcf8563_driver); MODULE_AUTHOR("Alessandro Zummo "); MODULE_DESCRIPTION("Philips PCF8563/Epson RTC8564 RTC driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(DRV_VERSION); - -module_init(pcf8563_init); -module_exit(pcf8563_exit); -- cgit v1.2.3