aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/Kconfig8
-rw-r--r--drivers/rtc/Makefile1
-rw-r--r--drivers/rtc/rtc-88pm80x.c6
-rw-r--r--drivers/rtc/rtc-88pm860x.c10
-rw-r--r--drivers/rtc/rtc-ab8500.c6
-rw-r--r--drivers/rtc/rtc-at91sam9.c6
-rw-r--r--drivers/rtc/rtc-au1xxx.c6
-rw-r--r--drivers/rtc/rtc-bfin.c6
-rw-r--r--drivers/rtc/rtc-bq32k.c4
-rw-r--r--drivers/rtc/rtc-bq4802.c6
-rw-r--r--drivers/rtc/rtc-cmos.c9
-rw-r--r--drivers/rtc/rtc-da9052.c6
-rw-r--r--drivers/rtc/rtc-da9055.c2
-rw-r--r--drivers/rtc/rtc-davinci.c4
-rw-r--r--drivers/rtc/rtc-dm355evm.c6
-rw-r--r--drivers/rtc/rtc-ds1286.c6
-rw-r--r--drivers/rtc/rtc-ds1302.c4
-rw-r--r--drivers/rtc/rtc-ds1305.c6
-rw-r--r--drivers/rtc/rtc-ds1307.c8
-rw-r--r--drivers/rtc/rtc-ds1374.c4
-rw-r--r--drivers/rtc/rtc-ds1390.c6
-rw-r--r--drivers/rtc/rtc-ds1511.c8
-rw-r--r--drivers/rtc/rtc-ds1553.c6
-rw-r--r--drivers/rtc/rtc-ds1742.c6
-rw-r--r--drivers/rtc/rtc-ds3232.c8
-rw-r--r--drivers/rtc/rtc-ds3234.c6
-rw-r--r--drivers/rtc/rtc-ep93xx.c6
-rw-r--r--drivers/rtc/rtc-fm3130.c8
-rw-r--r--drivers/rtc/rtc-imxdi.c4
-rw-r--r--drivers/rtc/rtc-jz4740.c6
-rw-r--r--drivers/rtc/rtc-lpc32xx.c6
-rw-r--r--drivers/rtc/rtc-ls1x.c6
-rw-r--r--drivers/rtc/rtc-m41t93.c6
-rw-r--r--drivers/rtc/rtc-m41t94.c6
-rw-r--r--drivers/rtc/rtc-m48t35.c6
-rw-r--r--drivers/rtc/rtc-m48t59.c6
-rw-r--r--drivers/rtc/rtc-m48t86.c6
-rw-r--r--drivers/rtc/rtc-max6902.c6
-rw-r--r--drivers/rtc/rtc-max8907.c6
-rw-r--r--drivers/rtc/rtc-max8925.c6
-rw-r--r--drivers/rtc/rtc-max8998.c6
-rw-r--r--drivers/rtc/rtc-mpc5121.c8
-rw-r--r--drivers/rtc/rtc-mrst.c12
-rw-r--r--drivers/rtc/rtc-mv.c2
-rw-r--r--drivers/rtc/rtc-mxc.c6
-rw-r--r--drivers/rtc/rtc-nuc900.c6
-rw-r--r--drivers/rtc/rtc-pcap.c6
-rw-r--r--drivers/rtc/rtc-pcf2123.c6
-rw-r--r--drivers/rtc/rtc-pcf50633.c6
-rw-r--r--drivers/rtc/rtc-pcf8563.c2
-rw-r--r--drivers/rtc/rtc-pcf8583.c4
-rw-r--r--drivers/rtc/rtc-pm8xxx.c6
-rw-r--r--drivers/rtc/rtc-puv3.c6
-rw-r--r--drivers/rtc/rtc-r9701.c6
-rw-r--r--drivers/rtc/rtc-rc5t583.c6
-rw-r--r--drivers/rtc/rtc-rs5c313.c4
-rw-r--r--drivers/rtc/rtc-rs5c348.c6
-rw-r--r--drivers/rtc/rtc-rv3029c2.c8
-rw-r--r--drivers/rtc/rtc-rx8025.c8
-rw-r--r--drivers/rtc/rtc-rx8581.c8
-rw-r--r--drivers/rtc/rtc-s3c.c6
-rw-r--r--drivers/rtc/rtc-snvs.c8
-rw-r--r--drivers/rtc/rtc-spear.c6
-rw-r--r--drivers/rtc/rtc-stk17ta8.c6
-rw-r--r--drivers/rtc/rtc-tegra.c13
-rw-r--r--drivers/rtc/rtc-test.c4
-rw-r--r--drivers/rtc/rtc-tile.c6
-rw-r--r--drivers/rtc/rtc-tps6586x.c356
-rw-r--r--drivers/rtc/rtc-tps65910.c6
-rw-r--r--drivers/rtc/rtc-twl.c6
-rw-r--r--drivers/rtc/rtc-vr41xx.c6
-rw-r--r--drivers/rtc/rtc-vt8500.c17
-rw-r--r--drivers/rtc/rtc-wm831x.c4
-rw-r--r--drivers/rtc/rtc-wm8350.c4
74 files changed, 588 insertions, 220 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index d0cea02b5dfc..923a9da9c829 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -352,6 +352,14 @@ config RTC_DRV_TWL4030
352 This driver can also be built as a module. If so, the module 352 This driver can also be built as a module. If so, the module
353 will be called rtc-twl. 353 will be called rtc-twl.
354 354
355config RTC_DRV_TPS6586X
356 tristate "TI TPS6586X RTC driver"
357 depends on MFD_TPS6586X
358 help
359 TI Power Managment IC TPS6586X supports RTC functionality
360 along with alarm. This driver supports the RTC driver for
361 the TPS6586X RTC module.
362
355config RTC_DRV_TPS65910 363config RTC_DRV_TPS65910
356 tristate "TI TPS65910 RTC driver" 364 tristate "TI TPS65910 RTC driver"
357 depends on RTC_CLASS && MFD_TPS65910 365 depends on RTC_CLASS && MFD_TPS65910
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index c3f62c80dc06..4418ef3f9ecc 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_TEGRA) += rtc-tegra.o
111obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o 111obj-$(CONFIG_RTC_DRV_TEST) += rtc-test.o
112obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o 112obj-$(CONFIG_RTC_DRV_TILE) += rtc-tile.o
113obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o 113obj-$(CONFIG_RTC_DRV_TWL4030) += rtc-twl.o
114obj-$(CONFIG_RTC_DRV_TPS6586X) += rtc-tps6586x.o
114obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o 115obj-$(CONFIG_RTC_DRV_TPS65910) += rtc-tps65910.o
115obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o 116obj-$(CONFIG_RTC_DRV_TX4939) += rtc-tx4939.o
116obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o 117obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020.o
diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c
index 6367984e0565..63b17ebe90e8 100644
--- a/drivers/rtc/rtc-88pm80x.c
+++ b/drivers/rtc/rtc-88pm80x.c
@@ -248,7 +248,7 @@ static int pm80x_rtc_resume(struct device *dev)
248 248
249static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume); 249static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume);
250 250
251static int __devinit pm80x_rtc_probe(struct platform_device *pdev) 251static int pm80x_rtc_probe(struct platform_device *pdev)
252{ 252{
253 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); 253 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
254 struct pm80x_platform_data *pm80x_pdata; 254 struct pm80x_platform_data *pm80x_pdata;
@@ -342,7 +342,7 @@ out:
342 return ret; 342 return ret;
343} 343}
344 344
345static int __devexit pm80x_rtc_remove(struct platform_device *pdev) 345static int pm80x_rtc_remove(struct platform_device *pdev)
346{ 346{
347 struct pm80x_rtc_info *info = platform_get_drvdata(pdev); 347 struct pm80x_rtc_info *info = platform_get_drvdata(pdev);
348 platform_set_drvdata(pdev, NULL); 348 platform_set_drvdata(pdev, NULL);
@@ -358,7 +358,7 @@ static struct platform_driver pm80x_rtc_driver = {
358 .pm = &pm80x_rtc_pm_ops, 358 .pm = &pm80x_rtc_pm_ops,
359 }, 359 },
360 .probe = pm80x_rtc_probe, 360 .probe = pm80x_rtc_probe,
361 .remove = __devexit_p(pm80x_rtc_remove), 361 .remove = pm80x_rtc_remove,
362}; 362};
363 363
364module_platform_driver(pm80x_rtc_driver); 364module_platform_driver(pm80x_rtc_driver);
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c
index de9e854b326a..f663746f4603 100644
--- a/drivers/rtc/rtc-88pm860x.c
+++ b/drivers/rtc/rtc-88pm860x.c
@@ -286,8 +286,8 @@ out:
286#endif 286#endif
287 287
288#ifdef CONFIG_OF 288#ifdef CONFIG_OF
289static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev, 289static int pm860x_rtc_dt_init(struct platform_device *pdev,
290 struct pm860x_rtc_info *info) 290 struct pm860x_rtc_info *info)
291{ 291{
292 struct device_node *np = pdev->dev.parent->of_node; 292 struct device_node *np = pdev->dev.parent->of_node;
293 int ret; 293 int ret;
@@ -307,7 +307,7 @@ static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev,
307#define pm860x_rtc_dt_init(x, y) (-1) 307#define pm860x_rtc_dt_init(x, y) (-1)
308#endif 308#endif
309 309
310static int __devinit pm860x_rtc_probe(struct platform_device *pdev) 310static int pm860x_rtc_probe(struct platform_device *pdev)
311{ 311{
312 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 312 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
313 struct pm860x_rtc_pdata *pdata = NULL; 313 struct pm860x_rtc_pdata *pdata = NULL;
@@ -412,7 +412,7 @@ out:
412 return ret; 412 return ret;
413} 413}
414 414
415static int __devexit pm860x_rtc_remove(struct platform_device *pdev) 415static int pm860x_rtc_remove(struct platform_device *pdev)
416{ 416{
417 struct pm860x_rtc_info *info = platform_get_drvdata(pdev); 417 struct pm860x_rtc_info *info = platform_get_drvdata(pdev);
418 418
@@ -459,7 +459,7 @@ static struct platform_driver pm860x_rtc_driver = {
459 .pm = &pm860x_rtc_pm_ops, 459 .pm = &pm860x_rtc_pm_ops,
460 }, 460 },
461 .probe = pm860x_rtc_probe, 461 .probe = pm860x_rtc_probe,
462 .remove = __devexit_p(pm860x_rtc_remove), 462 .remove = pm860x_rtc_remove,
463}; 463};
464 464
465module_platform_driver(pm860x_rtc_driver); 465module_platform_driver(pm860x_rtc_driver);
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index 2e5970fe9eeb..57cde2b061e6 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -389,7 +389,7 @@ static const struct rtc_class_ops ab8500_rtc_ops = {
389 .alarm_irq_enable = ab8500_rtc_irq_enable, 389 .alarm_irq_enable = ab8500_rtc_irq_enable,
390}; 390};
391 391
392static int __devinit ab8500_rtc_probe(struct platform_device *pdev) 392static int ab8500_rtc_probe(struct platform_device *pdev)
393{ 393{
394 int err; 394 int err;
395 struct rtc_device *rtc; 395 struct rtc_device *rtc;
@@ -448,7 +448,7 @@ static int __devinit ab8500_rtc_probe(struct platform_device *pdev)
448 return 0; 448 return 0;
449} 449}
450 450
451static int __devexit ab8500_rtc_remove(struct platform_device *pdev) 451static int ab8500_rtc_remove(struct platform_device *pdev)
452{ 452{
453 struct rtc_device *rtc = platform_get_drvdata(pdev); 453 struct rtc_device *rtc = platform_get_drvdata(pdev);
454 int irq = platform_get_irq_byname(pdev, "ALARM"); 454 int irq = platform_get_irq_byname(pdev, "ALARM");
@@ -468,7 +468,7 @@ static struct platform_driver ab8500_rtc_driver = {
468 .owner = THIS_MODULE, 468 .owner = THIS_MODULE,
469 }, 469 },
470 .probe = ab8500_rtc_probe, 470 .probe = ab8500_rtc_probe,
471 .remove = __devexit_p(ab8500_rtc_remove), 471 .remove = ab8500_rtc_remove,
472}; 472};
473 473
474module_platform_driver(ab8500_rtc_driver); 474module_platform_driver(ab8500_rtc_driver);
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index e981798e9a9b..39cfd2ee0042 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -289,7 +289,7 @@ static const struct rtc_class_ops at91_rtc_ops = {
289/* 289/*
290 * Initialize and install RTC driver 290 * Initialize and install RTC driver
291 */ 291 */
292static int __devinit at91_rtc_probe(struct platform_device *pdev) 292static int at91_rtc_probe(struct platform_device *pdev)
293{ 293{
294 struct resource *r, *r_gpbr; 294 struct resource *r, *r_gpbr;
295 struct sam9_rtc *rtc; 295 struct sam9_rtc *rtc;
@@ -387,7 +387,7 @@ fail:
387/* 387/*
388 * Disable and remove the RTC driver 388 * Disable and remove the RTC driver
389 */ 389 */
390static int __devexit at91_rtc_remove(struct platform_device *pdev) 390static int at91_rtc_remove(struct platform_device *pdev)
391{ 391{
392 struct sam9_rtc *rtc = platform_get_drvdata(pdev); 392 struct sam9_rtc *rtc = platform_get_drvdata(pdev);
393 u32 mr = rtt_readl(rtc, MR); 393 u32 mr = rtt_readl(rtc, MR);
@@ -463,7 +463,7 @@ static int at91_rtc_resume(struct platform_device *pdev)
463 463
464static struct platform_driver at91_rtc_driver = { 464static struct platform_driver at91_rtc_driver = {
465 .probe = at91_rtc_probe, 465 .probe = at91_rtc_probe,
466 .remove = __devexit_p(at91_rtc_remove), 466 .remove = at91_rtc_remove,
467 .shutdown = at91_rtc_shutdown, 467 .shutdown = at91_rtc_shutdown,
468 .suspend = at91_rtc_suspend, 468 .suspend = at91_rtc_suspend,
469 .resume = at91_rtc_resume, 469 .resume = at91_rtc_resume,
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c
index 979ed0406ce9..b309da4ec745 100644
--- a/drivers/rtc/rtc-au1xxx.c
+++ b/drivers/rtc/rtc-au1xxx.c
@@ -62,7 +62,7 @@ static struct rtc_class_ops au1xtoy_rtc_ops = {
62 .set_time = au1xtoy_rtc_set_time, 62 .set_time = au1xtoy_rtc_set_time,
63}; 63};
64 64
65static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) 65static int au1xtoy_rtc_probe(struct platform_device *pdev)
66{ 66{
67 struct rtc_device *rtcdev; 67 struct rtc_device *rtcdev;
68 unsigned long t; 68 unsigned long t;
@@ -116,7 +116,7 @@ out_err:
116 return ret; 116 return ret;
117} 117}
118 118
119static int __devexit au1xtoy_rtc_remove(struct platform_device *pdev) 119static int au1xtoy_rtc_remove(struct platform_device *pdev)
120{ 120{
121 struct rtc_device *rtcdev = platform_get_drvdata(pdev); 121 struct rtc_device *rtcdev = platform_get_drvdata(pdev);
122 122
@@ -131,7 +131,7 @@ static struct platform_driver au1xrtc_driver = {
131 .name = "rtc-au1xxx", 131 .name = "rtc-au1xxx",
132 .owner = THIS_MODULE, 132 .owner = THIS_MODULE,
133 }, 133 },
134 .remove = __devexit_p(au1xtoy_rtc_remove), 134 .remove = au1xtoy_rtc_remove,
135}; 135};
136 136
137static int __init au1xtoy_rtc_init(void) 137static int __init au1xtoy_rtc_init(void)
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index abfc1a0c07d9..4ec614b0954d 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -342,7 +342,7 @@ static struct rtc_class_ops bfin_rtc_ops = {
342 .alarm_irq_enable = bfin_rtc_alarm_irq_enable, 342 .alarm_irq_enable = bfin_rtc_alarm_irq_enable,
343}; 343};
344 344
345static int __devinit bfin_rtc_probe(struct platform_device *pdev) 345static int bfin_rtc_probe(struct platform_device *pdev)
346{ 346{
347 struct bfin_rtc *rtc; 347 struct bfin_rtc *rtc;
348 struct device *dev = &pdev->dev; 348 struct device *dev = &pdev->dev;
@@ -388,7 +388,7 @@ err:
388 return ret; 388 return ret;
389} 389}
390 390
391static int __devexit bfin_rtc_remove(struct platform_device *pdev) 391static int bfin_rtc_remove(struct platform_device *pdev)
392{ 392{
393 struct bfin_rtc *rtc = platform_get_drvdata(pdev); 393 struct bfin_rtc *rtc = platform_get_drvdata(pdev);
394 struct device *dev = &pdev->dev; 394 struct device *dev = &pdev->dev;
@@ -451,7 +451,7 @@ static struct platform_driver bfin_rtc_driver = {
451 .owner = THIS_MODULE, 451 .owner = THIS_MODULE,
452 }, 452 },
453 .probe = bfin_rtc_probe, 453 .probe = bfin_rtc_probe,
454 .remove = __devexit_p(bfin_rtc_remove), 454 .remove = bfin_rtc_remove,
455 .suspend = bfin_rtc_suspend, 455 .suspend = bfin_rtc_suspend,
456 .resume = bfin_rtc_resume, 456 .resume = bfin_rtc_resume,
457}; 457};
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index f090159dce4a..036cb89f8188 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32k.c
@@ -163,7 +163,7 @@ static int bq32k_probe(struct i2c_client *client,
163 return 0; 163 return 0;
164} 164}
165 165
166static int __devexit bq32k_remove(struct i2c_client *client) 166static int bq32k_remove(struct i2c_client *client)
167{ 167{
168 struct rtc_device *rtc = i2c_get_clientdata(client); 168 struct rtc_device *rtc = i2c_get_clientdata(client);
169 169
@@ -183,7 +183,7 @@ static struct i2c_driver bq32k_driver = {
183 .owner = THIS_MODULE, 183 .owner = THIS_MODULE,
184 }, 184 },
185 .probe = bq32k_probe, 185 .probe = bq32k_probe,
186 .remove = __devexit_p(bq32k_remove), 186 .remove = bq32k_remove,
187 .id_table = bq32k_id, 187 .id_table = bq32k_id,
188}; 188};
189 189
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c
index bf612ef22941..693be71b5b18 100644
--- a/drivers/rtc/rtc-bq4802.c
+++ b/drivers/rtc/rtc-bq4802.c
@@ -140,7 +140,7 @@ static const struct rtc_class_ops bq4802_ops = {
140 .set_time = bq4802_set_time, 140 .set_time = bq4802_set_time,
141}; 141};
142 142
143static int __devinit bq4802_probe(struct platform_device *pdev) 143static int bq4802_probe(struct platform_device *pdev)
144{ 144{
145 struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL); 145 struct bq4802 *p = kzalloc(sizeof(*p), GFP_KERNEL);
146 int err = -ENOMEM; 146 int err = -ENOMEM;
@@ -191,7 +191,7 @@ out_free:
191 goto out; 191 goto out;
192} 192}
193 193
194static int __devexit bq4802_remove(struct platform_device *pdev) 194static int bq4802_remove(struct platform_device *pdev)
195{ 195{
196 struct bq4802 *p = platform_get_drvdata(pdev); 196 struct bq4802 *p = platform_get_drvdata(pdev);
197 197
@@ -215,7 +215,7 @@ static struct platform_driver bq4802_driver = {
215 .owner = THIS_MODULE, 215 .owner = THIS_MODULE,
216 }, 216 },
217 .probe = bq4802_probe, 217 .probe = bq4802_probe,
218 .remove = __devexit_p(bq4802_remove), 218 .remove = bq4802_remove,
219}; 219};
220 220
221module_platform_driver(bq4802_driver); 221module_platform_driver(bq4802_driver);
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 4267789ca995..16630aa87f45 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -947,8 +947,7 @@ static void rtc_wake_off(struct device *dev)
947 */ 947 */
948static struct cmos_rtc_board_info acpi_rtc_info; 948static struct cmos_rtc_board_info acpi_rtc_info;
949 949
950static void __devinit 950static void cmos_wake_setup(struct device *dev)
951cmos_wake_setup(struct device *dev)
952{ 951{
953 if (acpi_disabled) 952 if (acpi_disabled)
954 return; 953 return;
@@ -980,8 +979,7 @@ cmos_wake_setup(struct device *dev)
980 979
981#else 980#else
982 981
983static void __devinit 982static void cmos_wake_setup(struct device *dev)
984cmos_wake_setup(struct device *dev)
985{ 983{
986} 984}
987 985
@@ -991,8 +989,7 @@ cmos_wake_setup(struct device *dev)
991 989
992#include <linux/pnp.h> 990#include <linux/pnp.h>
993 991
994static int __devinit 992static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
995cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
996{ 993{
997 cmos_wake_setup(&pnp->dev); 994 cmos_wake_setup(&pnp->dev);
998 995
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index 78070255bd3f..60b826e520e2 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -228,7 +228,7 @@ static const struct rtc_class_ops da9052_rtc_ops = {
228 .alarm_irq_enable = da9052_rtc_alarm_irq_enable, 228 .alarm_irq_enable = da9052_rtc_alarm_irq_enable,
229}; 229};
230 230
231static int __devinit da9052_rtc_probe(struct platform_device *pdev) 231static int da9052_rtc_probe(struct platform_device *pdev)
232{ 232{
233 struct da9052_rtc *rtc; 233 struct da9052_rtc *rtc;
234 int ret; 234 int ret;
@@ -262,7 +262,7 @@ err_free_irq:
262 return ret; 262 return ret;
263} 263}
264 264
265static int __devexit da9052_rtc_remove(struct platform_device *pdev) 265static int da9052_rtc_remove(struct platform_device *pdev)
266{ 266{
267 struct da9052_rtc *rtc = pdev->dev.platform_data; 267 struct da9052_rtc *rtc = pdev->dev.platform_data;
268 268
@@ -275,7 +275,7 @@ static int __devexit da9052_rtc_remove(struct platform_device *pdev)
275 275
276static struct platform_driver da9052_rtc_driver = { 276static struct platform_driver da9052_rtc_driver = {
277 .probe = da9052_rtc_probe, 277 .probe = da9052_rtc_probe,
278 .remove = __devexit_p(da9052_rtc_remove), 278 .remove = da9052_rtc_remove,
279 .driver = { 279 .driver = {
280 .name = "da9052-rtc", 280 .name = "da9052-rtc",
281 .owner = THIS_MODULE, 281 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-da9055.c b/drivers/rtc/rtc-da9055.c
index 96bafc5c3bf8..8f0dcfedb83c 100644
--- a/drivers/rtc/rtc-da9055.c
+++ b/drivers/rtc/rtc-da9055.c
@@ -227,7 +227,7 @@ static const struct rtc_class_ops da9055_rtc_ops = {
227 .alarm_irq_enable = da9055_rtc_alarm_irq_enable, 227 .alarm_irq_enable = da9055_rtc_alarm_irq_enable,
228}; 228};
229 229
230static int __init da9055_rtc_device_init(struct da9055 *da9055, 230static int da9055_rtc_device_init(struct da9055 *da9055,
231 struct da9055_pdata *pdata) 231 struct da9055_pdata *pdata)
232{ 232{
233 int ret; 233 int ret;
diff --git a/drivers/rtc/rtc-davinci.c b/drivers/rtc/rtc-davinci.c
index 07cd03eae606..5f7982f7c1b5 100644
--- a/drivers/rtc/rtc-davinci.c
+++ b/drivers/rtc/rtc-davinci.c
@@ -567,7 +567,7 @@ fail2:
567 return ret; 567 return ret;
568} 568}
569 569
570static int __devexit davinci_rtc_remove(struct platform_device *pdev) 570static int davinci_rtc_remove(struct platform_device *pdev)
571{ 571{
572 struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev); 572 struct davinci_rtc *davinci_rtc = platform_get_drvdata(pdev);
573 573
@@ -589,7 +589,7 @@ static int __devexit davinci_rtc_remove(struct platform_device *pdev)
589 589
590static struct platform_driver davinci_rtc_driver = { 590static struct platform_driver davinci_rtc_driver = {
591 .probe = davinci_rtc_probe, 591 .probe = davinci_rtc_probe,
592 .remove = __devexit_p(davinci_rtc_remove), 592 .remove = davinci_rtc_remove,
593 .driver = { 593 .driver = {
594 .name = "rtc_davinci", 594 .name = "rtc_davinci",
595 .owner = THIS_MODULE, 595 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-dm355evm.c b/drivers/rtc/rtc-dm355evm.c
index d4457afcba89..b2ed2c94b081 100644
--- a/drivers/rtc/rtc-dm355evm.c
+++ b/drivers/rtc/rtc-dm355evm.c
@@ -123,7 +123,7 @@ static struct rtc_class_ops dm355evm_rtc_ops = {
123 123
124/*----------------------------------------------------------------------*/ 124/*----------------------------------------------------------------------*/
125 125
126static int __devinit dm355evm_rtc_probe(struct platform_device *pdev) 126static int dm355evm_rtc_probe(struct platform_device *pdev)
127{ 127{
128 struct rtc_device *rtc; 128 struct rtc_device *rtc;
129 129
@@ -139,7 +139,7 @@ static int __devinit dm355evm_rtc_probe(struct platform_device *pdev)
139 return 0; 139 return 0;
140} 140}
141 141
142static int __devexit dm355evm_rtc_remove(struct platform_device *pdev) 142static int dm355evm_rtc_remove(struct platform_device *pdev)
143{ 143{
144 struct rtc_device *rtc = platform_get_drvdata(pdev); 144 struct rtc_device *rtc = platform_get_drvdata(pdev);
145 145
@@ -154,7 +154,7 @@ static int __devexit dm355evm_rtc_remove(struct platform_device *pdev)
154 */ 154 */
155static struct platform_driver rtc_dm355evm_driver = { 155static struct platform_driver rtc_dm355evm_driver = {
156 .probe = dm355evm_rtc_probe, 156 .probe = dm355evm_rtc_probe,
157 .remove = __devexit_p(dm355evm_rtc_remove), 157 .remove = dm355evm_rtc_remove,
158 .driver = { 158 .driver = {
159 .owner = THIS_MODULE, 159 .owner = THIS_MODULE,
160 .name = "rtc-dm355evm", 160 .name = "rtc-dm355evm",
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c
index 990c3ff489bf..d989412a348a 100644
--- a/drivers/rtc/rtc-ds1286.c
+++ b/drivers/rtc/rtc-ds1286.c
@@ -329,7 +329,7 @@ static const struct rtc_class_ops ds1286_ops = {
329 .alarm_irq_enable = ds1286_alarm_irq_enable, 329 .alarm_irq_enable = ds1286_alarm_irq_enable,
330}; 330};
331 331
332static int __devinit ds1286_probe(struct platform_device *pdev) 332static int ds1286_probe(struct platform_device *pdev)
333{ 333{
334 struct rtc_device *rtc; 334 struct rtc_device *rtc;
335 struct resource *res; 335 struct resource *res;
@@ -376,7 +376,7 @@ out:
376 return ret; 376 return ret;
377} 377}
378 378
379static int __devexit ds1286_remove(struct platform_device *pdev) 379static int ds1286_remove(struct platform_device *pdev)
380{ 380{
381 struct ds1286_priv *priv = platform_get_drvdata(pdev); 381 struct ds1286_priv *priv = platform_get_drvdata(pdev);
382 382
@@ -393,7 +393,7 @@ static struct platform_driver ds1286_platform_driver = {
393 .owner = THIS_MODULE, 393 .owner = THIS_MODULE,
394 }, 394 },
395 .probe = ds1286_probe, 395 .probe = ds1286_probe,
396 .remove = __devexit_p(ds1286_remove), 396 .remove = ds1286_remove,
397}; 397};
398 398
399module_platform_driver(ds1286_platform_driver); 399module_platform_driver(ds1286_platform_driver);
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index f0d638922644..fdbcdb289d60 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -234,7 +234,7 @@ static int __init ds1302_rtc_probe(struct platform_device *pdev)
234 return 0; 234 return 0;
235} 235}
236 236
237static int __devexit ds1302_rtc_remove(struct platform_device *pdev) 237static int ds1302_rtc_remove(struct platform_device *pdev)
238{ 238{
239 struct rtc_device *rtc = platform_get_drvdata(pdev); 239 struct rtc_device *rtc = platform_get_drvdata(pdev);
240 240
@@ -249,7 +249,7 @@ static struct platform_driver ds1302_platform_driver = {
249 .name = DRV_NAME, 249 .name = DRV_NAME,
250 .owner = THIS_MODULE, 250 .owner = THIS_MODULE,
251 }, 251 },
252 .remove = __devexit_p(ds1302_rtc_remove), 252 .remove = ds1302_rtc_remove,
253}; 253};
254 254
255static int __init ds1302_rtc_init(void) 255static int __init ds1302_rtc_init(void)
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 686a865913e1..d578773f5ce2 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -601,7 +601,7 @@ static struct bin_attribute nvram = {
601 * Interface to SPI stack 601 * Interface to SPI stack
602 */ 602 */
603 603
604static int __devinit ds1305_probe(struct spi_device *spi) 604static int ds1305_probe(struct spi_device *spi)
605{ 605{
606 struct ds1305 *ds1305; 606 struct ds1305 *ds1305;
607 int status; 607 int status;
@@ -787,7 +787,7 @@ fail0:
787 return status; 787 return status;
788} 788}
789 789
790static int __devexit ds1305_remove(struct spi_device *spi) 790static int ds1305_remove(struct spi_device *spi)
791{ 791{
792 struct ds1305 *ds1305 = spi_get_drvdata(spi); 792 struct ds1305 *ds1305 = spi_get_drvdata(spi);
793 793
@@ -810,7 +810,7 @@ static struct spi_driver ds1305_driver = {
810 .driver.name = "rtc-ds1305", 810 .driver.name = "rtc-ds1305",
811 .driver.owner = THIS_MODULE, 811 .driver.owner = THIS_MODULE,
812 .probe = ds1305_probe, 812 .probe = ds1305_probe,
813 .remove = __devexit_p(ds1305_remove), 813 .remove = ds1305_remove,
814 /* REVISIT add suspend/resume */ 814 /* REVISIT add suspend/resume */
815}; 815};
816 816
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 836710ce750e..e0d0ba4de03f 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -617,8 +617,8 @@ ds1307_nvram_write(struct file *filp, struct kobject *kobj,
617 617
618/*----------------------------------------------------------------------*/ 618/*----------------------------------------------------------------------*/
619 619
620static int __devinit ds1307_probe(struct i2c_client *client, 620static int ds1307_probe(struct i2c_client *client,
621 const struct i2c_device_id *id) 621 const struct i2c_device_id *id)
622{ 622{
623 struct ds1307 *ds1307; 623 struct ds1307 *ds1307;
624 int err = -ENODEV; 624 int err = -ENODEV;
@@ -938,7 +938,7 @@ exit_free:
938 return err; 938 return err;
939} 939}
940 940
941static int __devexit ds1307_remove(struct i2c_client *client) 941static int ds1307_remove(struct i2c_client *client)
942{ 942{
943 struct ds1307 *ds1307 = i2c_get_clientdata(client); 943 struct ds1307 *ds1307 = i2c_get_clientdata(client);
944 944
@@ -963,7 +963,7 @@ static struct i2c_driver ds1307_driver = {
963 .owner = THIS_MODULE, 963 .owner = THIS_MODULE,
964 }, 964 },
965 .probe = ds1307_probe, 965 .probe = ds1307_probe,
966 .remove = __devexit_p(ds1307_remove), 966 .remove = ds1307_remove,
967 .id_table = ds1307_id, 967 .id_table = ds1307_id,
968}; 968};
969 969
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index 966316088b7f..fef76868aae0 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -391,7 +391,7 @@ out_free:
391 return ret; 391 return ret;
392} 392}
393 393
394static int __devexit ds1374_remove(struct i2c_client *client) 394static int ds1374_remove(struct i2c_client *client)
395{ 395{
396 struct ds1374 *ds1374 = i2c_get_clientdata(client); 396 struct ds1374 *ds1374 = i2c_get_clientdata(client);
397 397
@@ -442,7 +442,7 @@ static struct i2c_driver ds1374_driver = {
442 .pm = DS1374_PM, 442 .pm = DS1374_PM,
443 }, 443 },
444 .probe = ds1374_probe, 444 .probe = ds1374_probe,
445 .remove = __devexit_p(ds1374_remove), 445 .remove = ds1374_remove,
446 .id_table = ds1374_id, 446 .id_table = ds1374_id,
447}; 447};
448 448
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index b0a99e1b25be..f994257981a0 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -121,7 +121,7 @@ static const struct rtc_class_ops ds1390_rtc_ops = {
121 .set_time = ds1390_set_time, 121 .set_time = ds1390_set_time,
122}; 122};
123 123
124static int __devinit ds1390_probe(struct spi_device *spi) 124static int ds1390_probe(struct spi_device *spi)
125{ 125{
126 unsigned char tmp; 126 unsigned char tmp;
127 struct ds1390 *chip; 127 struct ds1390 *chip;
@@ -156,7 +156,7 @@ static int __devinit ds1390_probe(struct spi_device *spi)
156 return res; 156 return res;
157} 157}
158 158
159static int __devexit ds1390_remove(struct spi_device *spi) 159static int ds1390_remove(struct spi_device *spi)
160{ 160{
161 struct ds1390 *chip = spi_get_drvdata(spi); 161 struct ds1390 *chip = spi_get_drvdata(spi);
162 162
@@ -172,7 +172,7 @@ static struct spi_driver ds1390_driver = {
172 .owner = THIS_MODULE, 172 .owner = THIS_MODULE,
173 }, 173 },
174 .probe = ds1390_probe, 174 .probe = ds1390_probe,
175 .remove = __devexit_p(ds1390_remove), 175 .remove = ds1390_remove,
176}; 176};
177 177
178module_spi_driver(ds1390_driver); 178module_spi_driver(ds1390_driver);
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 1f675f5294f5..6a3fcfe3b0e7 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -476,8 +476,7 @@ static struct bin_attribute ds1511_nvram_attr = {
476 .write = ds1511_nvram_write, 476 .write = ds1511_nvram_write,
477}; 477};
478 478
479 static int __devinit 479static int ds1511_rtc_probe(struct platform_device *pdev)
480ds1511_rtc_probe(struct platform_device *pdev)
481{ 480{
482 struct rtc_device *rtc; 481 struct rtc_device *rtc;
483 struct resource *res; 482 struct resource *res;
@@ -551,8 +550,7 @@ ds1511_rtc_probe(struct platform_device *pdev)
551 return ret; 550 return ret;
552} 551}
553 552
554 static int __devexit 553static int ds1511_rtc_remove(struct platform_device *pdev)
555ds1511_rtc_remove(struct platform_device *pdev)
556{ 554{
557 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 555 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
558 556
@@ -573,7 +571,7 @@ MODULE_ALIAS("platform:ds1511");
573 571
574static struct platform_driver ds1511_rtc_driver = { 572static struct platform_driver ds1511_rtc_driver = {
575 .probe = ds1511_rtc_probe, 573 .probe = ds1511_rtc_probe,
576 .remove = __devexit_p(ds1511_rtc_remove), 574 .remove = ds1511_rtc_remove,
577 .driver = { 575 .driver = {
578 .name = "ds1511", 576 .name = "ds1511",
579 .owner = THIS_MODULE, 577 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 6ccedbbf923c..25ce0621ade9 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -276,7 +276,7 @@ static struct bin_attribute ds1553_nvram_attr = {
276 .write = ds1553_nvram_write, 276 .write = ds1553_nvram_write,
277}; 277};
278 278
279static int __devinit ds1553_rtc_probe(struct platform_device *pdev) 279static int ds1553_rtc_probe(struct platform_device *pdev)
280{ 280{
281 struct rtc_device *rtc; 281 struct rtc_device *rtc;
282 struct resource *res; 282 struct resource *res;
@@ -338,7 +338,7 @@ static int __devinit ds1553_rtc_probe(struct platform_device *pdev)
338 return ret; 338 return ret;
339} 339}
340 340
341static int __devexit ds1553_rtc_remove(struct platform_device *pdev) 341static int ds1553_rtc_remove(struct platform_device *pdev)
342{ 342{
343 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 343 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
344 344
@@ -354,7 +354,7 @@ MODULE_ALIAS("platform:rtc-ds1553");
354 354
355static struct platform_driver ds1553_rtc_driver = { 355static struct platform_driver ds1553_rtc_driver = {
356 .probe = ds1553_rtc_probe, 356 .probe = ds1553_rtc_probe,
357 .remove = __devexit_p(ds1553_rtc_remove), 357 .remove = ds1553_rtc_remove,
358 .driver = { 358 .driver = {
359 .name = "rtc-ds1553", 359 .name = "rtc-ds1553",
360 .owner = THIS_MODULE, 360 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 76112667c507..609c870e2cc5 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -159,7 +159,7 @@ static ssize_t ds1742_nvram_write(struct file *filp, struct kobject *kobj,
159 return count; 159 return count;
160} 160}
161 161
162static int __devinit ds1742_rtc_probe(struct platform_device *pdev) 162static int ds1742_rtc_probe(struct platform_device *pdev)
163{ 163{
164 struct rtc_device *rtc; 164 struct rtc_device *rtc;
165 struct resource *res; 165 struct resource *res;
@@ -222,7 +222,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev)
222 return ret; 222 return ret;
223} 223}
224 224
225static int __devexit ds1742_rtc_remove(struct platform_device *pdev) 225static int ds1742_rtc_remove(struct platform_device *pdev)
226{ 226{
227 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 227 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
228 228
@@ -233,7 +233,7 @@ static int __devexit ds1742_rtc_remove(struct platform_device *pdev)
233 233
234static struct platform_driver ds1742_rtc_driver = { 234static struct platform_driver ds1742_rtc_driver = {
235 .probe = ds1742_rtc_probe, 235 .probe = ds1742_rtc_probe,
236 .remove = __devexit_p(ds1742_rtc_remove), 236 .remove = ds1742_rtc_remove,
237 .driver = { 237 .driver = {
238 .name = "rtc-ds1742", 238 .name = "rtc-ds1742",
239 .owner = THIS_MODULE, 239 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index e1945095814e..db0ca08db315 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -391,8 +391,8 @@ static const struct rtc_class_ops ds3232_rtc_ops = {
391 .alarm_irq_enable = ds3232_alarm_irq_enable, 391 .alarm_irq_enable = ds3232_alarm_irq_enable,
392}; 392};
393 393
394static int __devinit ds3232_probe(struct i2c_client *client, 394static int ds3232_probe(struct i2c_client *client,
395 const struct i2c_device_id *id) 395 const struct i2c_device_id *id)
396{ 396{
397 struct ds3232 *ds3232; 397 struct ds3232 *ds3232;
398 int ret; 398 int ret;
@@ -439,7 +439,7 @@ out_free:
439 return ret; 439 return ret;
440} 440}
441 441
442static int __devexit ds3232_remove(struct i2c_client *client) 442static int ds3232_remove(struct i2c_client *client)
443{ 443{
444 struct ds3232 *ds3232 = i2c_get_clientdata(client); 444 struct ds3232 *ds3232 = i2c_get_clientdata(client);
445 445
@@ -469,7 +469,7 @@ static struct i2c_driver ds3232_driver = {
469 .owner = THIS_MODULE, 469 .owner = THIS_MODULE,
470 }, 470 },
471 .probe = ds3232_probe, 471 .probe = ds3232_probe,
472 .remove = __devexit_p(ds3232_remove), 472 .remove = ds3232_remove,
473 .id_table = ds3232_id, 473 .id_table = ds3232_id,
474}; 474};
475 475
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index fda707926f02..7a4495ef1c39 100644
--- a/drivers/rtc/rtc-ds3234.c
+++ b/drivers/rtc/rtc-ds3234.c
@@ -105,7 +105,7 @@ static const struct rtc_class_ops ds3234_rtc_ops = {
105 .set_time = ds3234_set_time, 105 .set_time = ds3234_set_time,
106}; 106};
107 107
108static int __devinit ds3234_probe(struct spi_device *spi) 108static int ds3234_probe(struct spi_device *spi)
109{ 109{
110 struct rtc_device *rtc; 110 struct rtc_device *rtc;
111 unsigned char tmp; 111 unsigned char tmp;
@@ -156,7 +156,7 @@ static int __devinit ds3234_probe(struct spi_device *spi)
156 return 0; 156 return 0;
157} 157}
158 158
159static int __devexit ds3234_remove(struct spi_device *spi) 159static int ds3234_remove(struct spi_device *spi)
160{ 160{
161 struct rtc_device *rtc = spi_get_drvdata(spi); 161 struct rtc_device *rtc = spi_get_drvdata(spi);
162 162
@@ -170,7 +170,7 @@ static struct spi_driver ds3234_driver = {
170 .owner = THIS_MODULE, 170 .owner = THIS_MODULE,
171 }, 171 },
172 .probe = ds3234_probe, 172 .probe = ds3234_probe,
173 .remove = __devexit_p(ds3234_remove), 173 .remove = ds3234_remove,
174}; 174};
175 175
176module_spi_driver(ds3234_driver); 176module_spi_driver(ds3234_driver);
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 9602278ff988..1a4e5e4a70cd 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -127,7 +127,7 @@ static const struct attribute_group ep93xx_rtc_sysfs_files = {
127 .attrs = ep93xx_rtc_attrs, 127 .attrs = ep93xx_rtc_attrs,
128}; 128};
129 129
130static int __devinit ep93xx_rtc_probe(struct platform_device *pdev) 130static int ep93xx_rtc_probe(struct platform_device *pdev)
131{ 131{
132 struct ep93xx_rtc *ep93xx_rtc; 132 struct ep93xx_rtc *ep93xx_rtc;
133 struct resource *res; 133 struct resource *res;
@@ -174,7 +174,7 @@ exit:
174 return err; 174 return err;
175} 175}
176 176
177static int __devexit ep93xx_rtc_remove(struct platform_device *pdev) 177static int ep93xx_rtc_remove(struct platform_device *pdev)
178{ 178{
179 struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev); 179 struct ep93xx_rtc *ep93xx_rtc = platform_get_drvdata(pdev);
180 180
@@ -192,7 +192,7 @@ static struct platform_driver ep93xx_rtc_driver = {
192 .owner = THIS_MODULE, 192 .owner = THIS_MODULE,
193 }, 193 },
194 .probe = ep93xx_rtc_probe, 194 .probe = ep93xx_rtc_probe,
195 .remove = __devexit_p(ep93xx_rtc_remove), 195 .remove = ep93xx_rtc_remove,
196}; 196};
197 197
198module_platform_driver(ep93xx_rtc_driver); 198module_platform_driver(ep93xx_rtc_driver);
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c
index 86b6ecce99f0..04e93c6597f8 100644
--- a/drivers/rtc/rtc-fm3130.c
+++ b/drivers/rtc/rtc-fm3130.c
@@ -361,8 +361,8 @@ static const struct rtc_class_ops fm3130_rtc_ops = {
361 361
362static struct i2c_driver fm3130_driver; 362static struct i2c_driver fm3130_driver;
363 363
364static int __devinit fm3130_probe(struct i2c_client *client, 364static int fm3130_probe(struct i2c_client *client,
365 const struct i2c_device_id *id) 365 const struct i2c_device_id *id)
366{ 366{
367 struct fm3130 *fm3130; 367 struct fm3130 *fm3130;
368 int err = -ENODEV; 368 int err = -ENODEV;
@@ -546,7 +546,7 @@ exit_free:
546 return err; 546 return err;
547} 547}
548 548
549static int __devexit fm3130_remove(struct i2c_client *client) 549static int fm3130_remove(struct i2c_client *client)
550{ 550{
551 struct fm3130 *fm3130 = i2c_get_clientdata(client); 551 struct fm3130 *fm3130 = i2c_get_clientdata(client);
552 552
@@ -561,7 +561,7 @@ static struct i2c_driver fm3130_driver = {
561 .owner = THIS_MODULE, 561 .owner = THIS_MODULE,
562 }, 562 },
563 .probe = fm3130_probe, 563 .probe = fm3130_probe,
564 .remove = __devexit_p(fm3130_remove), 564 .remove = fm3130_remove,
565 .id_table = fm3130_id, 565 .id_table = fm3130_id,
566}; 566};
567 567
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 8da7a5cf83c6..75d307ab37f4 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -480,7 +480,7 @@ err:
480 return rc; 480 return rc;
481} 481}
482 482
483static int __devexit dryice_rtc_remove(struct platform_device *pdev) 483static int dryice_rtc_remove(struct platform_device *pdev)
484{ 484{
485 struct imxdi_dev *imxdi = platform_get_drvdata(pdev); 485 struct imxdi_dev *imxdi = platform_get_drvdata(pdev);
486 486
@@ -512,7 +512,7 @@ static struct platform_driver dryice_rtc_driver = {
512 .owner = THIS_MODULE, 512 .owner = THIS_MODULE,
513 .of_match_table = of_match_ptr(dryice_dt_ids), 513 .of_match_table = of_match_ptr(dryice_dt_ids),
514 }, 514 },
515 .remove = __devexit_p(dryice_rtc_remove), 515 .remove = dryice_rtc_remove,
516}; 516};
517 517
518static int __init dryice_rtc_init(void) 518static int __init dryice_rtc_init(void)
diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 1224182d3eab..1e48686ca6d2 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -210,7 +210,7 @@ void jz4740_rtc_poweroff(struct device *dev)
210} 210}
211EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff); 211EXPORT_SYMBOL_GPL(jz4740_rtc_poweroff);
212 212
213static int __devinit jz4740_rtc_probe(struct platform_device *pdev) 213static int jz4740_rtc_probe(struct platform_device *pdev)
214{ 214{
215 int ret; 215 int ret;
216 struct jz4740_rtc *rtc; 216 struct jz4740_rtc *rtc;
@@ -297,7 +297,7 @@ err_free:
297 return ret; 297 return ret;
298} 298}
299 299
300static int __devexit jz4740_rtc_remove(struct platform_device *pdev) 300static int jz4740_rtc_remove(struct platform_device *pdev)
301{ 301{
302 struct jz4740_rtc *rtc = platform_get_drvdata(pdev); 302 struct jz4740_rtc *rtc = platform_get_drvdata(pdev);
303 303
@@ -347,7 +347,7 @@ static const struct dev_pm_ops jz4740_pm_ops = {
347 347
348static struct platform_driver jz4740_rtc_driver = { 348static struct platform_driver jz4740_rtc_driver = {
349 .probe = jz4740_rtc_probe, 349 .probe = jz4740_rtc_probe,
350 .remove = __devexit_p(jz4740_rtc_remove), 350 .remove = jz4740_rtc_remove,
351 .driver = { 351 .driver = {
352 .name = "jz4740-rtc", 352 .name = "jz4740-rtc",
353 .owner = THIS_MODULE, 353 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index d5218553741f..40a598332bac 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -197,7 +197,7 @@ static const struct rtc_class_ops lpc32xx_rtc_ops = {
197 .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable, 197 .alarm_irq_enable = lpc32xx_rtc_alarm_irq_enable,
198}; 198};
199 199
200static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev) 200static int lpc32xx_rtc_probe(struct platform_device *pdev)
201{ 201{
202 struct resource *res; 202 struct resource *res;
203 struct lpc32xx_rtc *rtc; 203 struct lpc32xx_rtc *rtc;
@@ -299,7 +299,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev)
299 return 0; 299 return 0;
300} 300}
301 301
302static int __devexit lpc32xx_rtc_remove(struct platform_device *pdev) 302static int lpc32xx_rtc_remove(struct platform_device *pdev)
303{ 303{
304 struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev); 304 struct lpc32xx_rtc *rtc = platform_get_drvdata(pdev);
305 305
@@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match);
397 397
398static struct platform_driver lpc32xx_rtc_driver = { 398static struct platform_driver lpc32xx_rtc_driver = {
399 .probe = lpc32xx_rtc_probe, 399 .probe = lpc32xx_rtc_probe,
400 .remove = __devexit_p(lpc32xx_rtc_remove), 400 .remove = lpc32xx_rtc_remove,
401 .driver = { 401 .driver = {
402 .name = RTC_NAME, 402 .name = RTC_NAME,
403 .owner = THIS_MODULE, 403 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c
index 07e81c5f8247..f59b6349551a 100644
--- a/drivers/rtc/rtc-ls1x.c
+++ b/drivers/rtc/rtc-ls1x.c
@@ -143,7 +143,7 @@ static struct rtc_class_ops ls1x_rtc_ops = {
143 .set_time = ls1x_rtc_set_time, 143 .set_time = ls1x_rtc_set_time,
144}; 144};
145 145
146static int __devinit ls1x_rtc_probe(struct platform_device *pdev) 146static int ls1x_rtc_probe(struct platform_device *pdev)
147{ 147{
148 struct rtc_device *rtcdev; 148 struct rtc_device *rtcdev;
149 unsigned long v; 149 unsigned long v;
@@ -185,7 +185,7 @@ err:
185 return ret; 185 return ret;
186} 186}
187 187
188static int __devexit ls1x_rtc_remove(struct platform_device *pdev) 188static int ls1x_rtc_remove(struct platform_device *pdev)
189{ 189{
190 struct rtc_device *rtcdev = platform_get_drvdata(pdev); 190 struct rtc_device *rtcdev = platform_get_drvdata(pdev);
191 191
@@ -200,7 +200,7 @@ static struct platform_driver ls1x_rtc_driver = {
200 .name = "ls1x-rtc", 200 .name = "ls1x-rtc",
201 .owner = THIS_MODULE, 201 .owner = THIS_MODULE,
202 }, 202 },
203 .remove = __devexit_p(ls1x_rtc_remove), 203 .remove = ls1x_rtc_remove,
204 .probe = ls1x_rtc_probe, 204 .probe = ls1x_rtc_probe,
205}; 205};
206 206
diff --git a/drivers/rtc/rtc-m41t93.c b/drivers/rtc/rtc-m41t93.c
index efab3d48cb15..49169680786e 100644
--- a/drivers/rtc/rtc-m41t93.c
+++ b/drivers/rtc/rtc-m41t93.c
@@ -170,7 +170,7 @@ static const struct rtc_class_ops m41t93_rtc_ops = {
170 170
171static struct spi_driver m41t93_driver; 171static struct spi_driver m41t93_driver;
172 172
173static int __devinit m41t93_probe(struct spi_device *spi) 173static int m41t93_probe(struct spi_device *spi)
174{ 174{
175 struct rtc_device *rtc; 175 struct rtc_device *rtc;
176 int res; 176 int res;
@@ -195,7 +195,7 @@ static int __devinit m41t93_probe(struct spi_device *spi)
195} 195}
196 196
197 197
198static int __devexit m41t93_remove(struct spi_device *spi) 198static int m41t93_remove(struct spi_device *spi)
199{ 199{
200 struct rtc_device *rtc = spi_get_drvdata(spi); 200 struct rtc_device *rtc = spi_get_drvdata(spi);
201 201
@@ -211,7 +211,7 @@ static struct spi_driver m41t93_driver = {
211 .owner = THIS_MODULE, 211 .owner = THIS_MODULE,
212 }, 212 },
213 .probe = m41t93_probe, 213 .probe = m41t93_probe,
214 .remove = __devexit_p(m41t93_remove), 214 .remove = m41t93_remove,
215}; 215};
216 216
217module_spi_driver(m41t93_driver); 217module_spi_driver(m41t93_driver);
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index 6e78193e026b..89266c6764bc 100644
--- a/drivers/rtc/rtc-m41t94.c
+++ b/drivers/rtc/rtc-m41t94.c
@@ -110,7 +110,7 @@ static const struct rtc_class_ops m41t94_rtc_ops = {
110 110
111static struct spi_driver m41t94_driver; 111static struct spi_driver m41t94_driver;
112 112
113static int __devinit m41t94_probe(struct spi_device *spi) 113static int m41t94_probe(struct spi_device *spi)
114{ 114{
115 struct rtc_device *rtc; 115 struct rtc_device *rtc;
116 int res; 116 int res;
@@ -134,7 +134,7 @@ static int __devinit m41t94_probe(struct spi_device *spi)
134 return 0; 134 return 0;
135} 135}
136 136
137static int __devexit m41t94_remove(struct spi_device *spi) 137static int m41t94_remove(struct spi_device *spi)
138{ 138{
139 struct rtc_device *rtc = spi_get_drvdata(spi); 139 struct rtc_device *rtc = spi_get_drvdata(spi);
140 140
@@ -150,7 +150,7 @@ static struct spi_driver m41t94_driver = {
150 .owner = THIS_MODULE, 150 .owner = THIS_MODULE,
151 }, 151 },
152 .probe = m41t94_probe, 152 .probe = m41t94_probe,
153 .remove = __devexit_p(m41t94_remove), 153 .remove = m41t94_remove,
154}; 154};
155 155
156module_spi_driver(m41t94_driver); 156module_spi_driver(m41t94_driver);
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c
index f9e3b3583733..31c9190a1fcb 100644
--- a/drivers/rtc/rtc-m48t35.c
+++ b/drivers/rtc/rtc-m48t35.c
@@ -141,7 +141,7 @@ static const struct rtc_class_ops m48t35_ops = {
141 .set_time = m48t35_set_time, 141 .set_time = m48t35_set_time,
142}; 142};
143 143
144static int __devinit m48t35_probe(struct platform_device *pdev) 144static int m48t35_probe(struct platform_device *pdev)
145{ 145{
146 struct resource *res; 146 struct resource *res;
147 struct m48t35_priv *priv; 147 struct m48t35_priv *priv;
@@ -194,7 +194,7 @@ out:
194 return ret; 194 return ret;
195} 195}
196 196
197static int __devexit m48t35_remove(struct platform_device *pdev) 197static int m48t35_remove(struct platform_device *pdev)
198{ 198{
199 struct m48t35_priv *priv = platform_get_drvdata(pdev); 199 struct m48t35_priv *priv = platform_get_drvdata(pdev);
200 200
@@ -213,7 +213,7 @@ static struct platform_driver m48t35_platform_driver = {
213 .owner = THIS_MODULE, 213 .owner = THIS_MODULE,
214 }, 214 },
215 .probe = m48t35_probe, 215 .probe = m48t35_probe,
216 .remove = __devexit_p(m48t35_remove), 216 .remove = m48t35_remove,
217}; 217};
218 218
219module_platform_driver(m48t35_platform_driver); 219module_platform_driver(m48t35_platform_driver);
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 30ebfec9fd2b..130f29af3869 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -383,7 +383,7 @@ static struct bin_attribute m48t59_nvram_attr = {
383 .write = m48t59_nvram_write, 383 .write = m48t59_nvram_write,
384}; 384};
385 385
386static int __devinit m48t59_rtc_probe(struct platform_device *pdev) 386static int m48t59_rtc_probe(struct platform_device *pdev)
387{ 387{
388 struct m48t59_plat_data *pdata = pdev->dev.platform_data; 388 struct m48t59_plat_data *pdata = pdev->dev.platform_data;
389 struct m48t59_private *m48t59 = NULL; 389 struct m48t59_private *m48t59 = NULL;
@@ -501,7 +501,7 @@ out:
501 return ret; 501 return ret;
502} 502}
503 503
504static int __devexit m48t59_rtc_remove(struct platform_device *pdev) 504static int m48t59_rtc_remove(struct platform_device *pdev)
505{ 505{
506 struct m48t59_private *m48t59 = platform_get_drvdata(pdev); 506 struct m48t59_private *m48t59 = platform_get_drvdata(pdev);
507 struct m48t59_plat_data *pdata = pdev->dev.platform_data; 507 struct m48t59_plat_data *pdata = pdev->dev.platform_data;
@@ -527,7 +527,7 @@ static struct platform_driver m48t59_rtc_driver = {
527 .owner = THIS_MODULE, 527 .owner = THIS_MODULE,
528 }, 528 },
529 .probe = m48t59_rtc_probe, 529 .probe = m48t59_rtc_probe,
530 .remove = __devexit_p(m48t59_rtc_remove), 530 .remove = m48t59_rtc_remove,
531}; 531};
532 532
533module_platform_driver(m48t59_rtc_driver); 533module_platform_driver(m48t59_rtc_driver);
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 863fb3363aa6..2ffbcacd2439 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -144,7 +144,7 @@ static const struct rtc_class_ops m48t86_rtc_ops = {
144 .proc = m48t86_rtc_proc, 144 .proc = m48t86_rtc_proc,
145}; 145};
146 146
147static int __devinit m48t86_rtc_probe(struct platform_device *dev) 147static int m48t86_rtc_probe(struct platform_device *dev)
148{ 148{
149 unsigned char reg; 149 unsigned char reg;
150 struct m48t86_ops *ops = dev->dev.platform_data; 150 struct m48t86_ops *ops = dev->dev.platform_data;
@@ -164,7 +164,7 @@ static int __devinit m48t86_rtc_probe(struct platform_device *dev)
164 return 0; 164 return 0;
165} 165}
166 166
167static int __devexit m48t86_rtc_remove(struct platform_device *dev) 167static int m48t86_rtc_remove(struct platform_device *dev)
168{ 168{
169 struct rtc_device *rtc = platform_get_drvdata(dev); 169 struct rtc_device *rtc = platform_get_drvdata(dev);
170 170
@@ -182,7 +182,7 @@ static struct platform_driver m48t86_rtc_platform_driver = {
182 .owner = THIS_MODULE, 182 .owner = THIS_MODULE,
183 }, 183 },
184 .probe = m48t86_rtc_probe, 184 .probe = m48t86_rtc_probe,
185 .remove = __devexit_p(m48t86_rtc_remove), 185 .remove = m48t86_rtc_remove,
186}; 186};
187 187
188module_platform_driver(m48t86_rtc_platform_driver); 188module_platform_driver(m48t86_rtc_platform_driver);
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c
index 36c74d22e8b5..7d0bf698b79e 100644
--- a/drivers/rtc/rtc-max6902.c
+++ b/drivers/rtc/rtc-max6902.c
@@ -120,7 +120,7 @@ static const struct rtc_class_ops max6902_rtc_ops = {
120 .set_time = max6902_set_time, 120 .set_time = max6902_set_time,
121}; 121};
122 122
123static int __devinit max6902_probe(struct spi_device *spi) 123static int max6902_probe(struct spi_device *spi)
124{ 124{
125 struct rtc_device *rtc; 125 struct rtc_device *rtc;
126 unsigned char tmp; 126 unsigned char tmp;
@@ -143,7 +143,7 @@ static int __devinit max6902_probe(struct spi_device *spi)
143 return 0; 143 return 0;
144} 144}
145 145
146static int __devexit max6902_remove(struct spi_device *spi) 146static int max6902_remove(struct spi_device *spi)
147{ 147{
148 struct rtc_device *rtc = dev_get_drvdata(&spi->dev); 148 struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
149 149
@@ -157,7 +157,7 @@ static struct spi_driver max6902_driver = {
157 .owner = THIS_MODULE, 157 .owner = THIS_MODULE,
158 }, 158 },
159 .probe = max6902_probe, 159 .probe = max6902_probe,
160 .remove = __devexit_p(max6902_remove), 160 .remove = max6902_remove,
161}; 161};
162 162
163module_spi_driver(max6902_driver); 163module_spi_driver(max6902_driver);
diff --git a/drivers/rtc/rtc-max8907.c b/drivers/rtc/rtc-max8907.c
index e094ffa434f8..1d049da16c85 100644
--- a/drivers/rtc/rtc-max8907.c
+++ b/drivers/rtc/rtc-max8907.c
@@ -176,7 +176,7 @@ static const struct rtc_class_ops max8907_rtc_ops = {
176 .set_alarm = max8907_rtc_set_alarm, 176 .set_alarm = max8907_rtc_set_alarm,
177}; 177};
178 178
179static int __devinit max8907_rtc_probe(struct platform_device *pdev) 179static int max8907_rtc_probe(struct platform_device *pdev)
180{ 180{
181 struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent); 181 struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent);
182 struct max8907_rtc *rtc; 182 struct max8907_rtc *rtc;
@@ -220,7 +220,7 @@ err_unregister:
220 return ret; 220 return ret;
221} 221}
222 222
223static int __devexit max8907_rtc_remove(struct platform_device *pdev) 223static int max8907_rtc_remove(struct platform_device *pdev)
224{ 224{
225 struct max8907_rtc *rtc = platform_get_drvdata(pdev); 225 struct max8907_rtc *rtc = platform_get_drvdata(pdev);
226 226
@@ -236,7 +236,7 @@ static struct platform_driver max8907_rtc_driver = {
236 .owner = THIS_MODULE, 236 .owner = THIS_MODULE,
237 }, 237 },
238 .probe = max8907_rtc_probe, 238 .probe = max8907_rtc_probe,
239 .remove = __devexit_p(max8907_rtc_remove), 239 .remove = max8907_rtc_remove,
240}; 240};
241module_platform_driver(max8907_rtc_driver); 241module_platform_driver(max8907_rtc_driver);
242 242
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c
index 34e4349611db..a0c8265646d2 100644
--- a/drivers/rtc/rtc-max8925.c
+++ b/drivers/rtc/rtc-max8925.c
@@ -247,7 +247,7 @@ static const struct rtc_class_ops max8925_rtc_ops = {
247 .set_alarm = max8925_rtc_set_alarm, 247 .set_alarm = max8925_rtc_set_alarm,
248}; 248};
249 249
250static int __devinit max8925_rtc_probe(struct platform_device *pdev) 250static int max8925_rtc_probe(struct platform_device *pdev)
251{ 251{
252 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); 252 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
253 struct max8925_rtc_info *info; 253 struct max8925_rtc_info *info;
@@ -292,7 +292,7 @@ out_irq:
292 return ret; 292 return ret;
293} 293}
294 294
295static int __devexit max8925_rtc_remove(struct platform_device *pdev) 295static int max8925_rtc_remove(struct platform_device *pdev)
296{ 296{
297 struct max8925_rtc_info *info = platform_get_drvdata(pdev); 297 struct max8925_rtc_info *info = platform_get_drvdata(pdev);
298 298
@@ -334,7 +334,7 @@ static struct platform_driver max8925_rtc_driver = {
334 .pm = &max8925_rtc_pm_ops, 334 .pm = &max8925_rtc_pm_ops,
335 }, 335 },
336 .probe = max8925_rtc_probe, 336 .probe = max8925_rtc_probe,
337 .remove = __devexit_p(max8925_rtc_remove), 337 .remove = max8925_rtc_remove,
338}; 338};
339 339
340module_platform_driver(max8925_rtc_driver); 340module_platform_driver(max8925_rtc_driver);
diff --git a/drivers/rtc/rtc-max8998.c b/drivers/rtc/rtc-max8998.c
index 7196f438c089..8f234a075e8f 100644
--- a/drivers/rtc/rtc-max8998.c
+++ b/drivers/rtc/rtc-max8998.c
@@ -249,7 +249,7 @@ static const struct rtc_class_ops max8998_rtc_ops = {
249 .alarm_irq_enable = max8998_rtc_alarm_irq_enable, 249 .alarm_irq_enable = max8998_rtc_alarm_irq_enable,
250}; 250};
251 251
252static int __devinit max8998_rtc_probe(struct platform_device *pdev) 252static int max8998_rtc_probe(struct platform_device *pdev)
253{ 253{
254 struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent); 254 struct max8998_dev *max8998 = dev_get_drvdata(pdev->dev.parent);
255 struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev); 255 struct max8998_platform_data *pdata = dev_get_platdata(max8998->dev);
@@ -298,7 +298,7 @@ out_rtc:
298 return ret; 298 return ret;
299} 299}
300 300
301static int __devexit max8998_rtc_remove(struct platform_device *pdev) 301static int max8998_rtc_remove(struct platform_device *pdev)
302{ 302{
303 struct max8998_rtc_info *info = platform_get_drvdata(pdev); 303 struct max8998_rtc_info *info = platform_get_drvdata(pdev);
304 304
@@ -323,7 +323,7 @@ static struct platform_driver max8998_rtc_driver = {
323 .owner = THIS_MODULE, 323 .owner = THIS_MODULE,
324 }, 324 },
325 .probe = max8998_rtc_probe, 325 .probe = max8998_rtc_probe,
326 .remove = __devexit_p(max8998_rtc_remove), 326 .remove = max8998_rtc_remove,
327 .id_table = max8998_rtc_id, 327 .id_table = max8998_rtc_id,
328}; 328};
329 329
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
index 029e421baaed..bec10be96f84 100644
--- a/drivers/rtc/rtc-mpc5121.c
+++ b/drivers/rtc/rtc-mpc5121.c
@@ -306,7 +306,7 @@ static const struct rtc_class_ops mpc5200_rtc_ops = {
306 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, 306 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable,
307}; 307};
308 308
309static int __devinit mpc5121_rtc_probe(struct platform_device *op) 309static int mpc5121_rtc_probe(struct platform_device *op)
310{ 310{
311 struct mpc5121_rtc_data *rtc; 311 struct mpc5121_rtc_data *rtc;
312 int err = 0; 312 int err = 0;
@@ -382,7 +382,7 @@ out_free:
382 return err; 382 return err;
383} 383}
384 384
385static int __devexit mpc5121_rtc_remove(struct platform_device *op) 385static int mpc5121_rtc_remove(struct platform_device *op)
386{ 386{
387 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); 387 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; 388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
@@ -403,7 +403,7 @@ static int __devexit mpc5121_rtc_remove(struct platform_device *op)
403 return 0; 403 return 0;
404} 404}
405 405
406static struct of_device_id mpc5121_rtc_match[] __devinitdata = { 406static struct of_device_id mpc5121_rtc_match[] = {
407 { .compatible = "fsl,mpc5121-rtc", }, 407 { .compatible = "fsl,mpc5121-rtc", },
408 { .compatible = "fsl,mpc5200-rtc", }, 408 { .compatible = "fsl,mpc5200-rtc", },
409 {}, 409 {},
@@ -416,7 +416,7 @@ static struct platform_driver mpc5121_rtc_driver = {
416 .of_match_table = mpc5121_rtc_match, 416 .of_match_table = mpc5121_rtc_match,
417 }, 417 },
418 .probe = mpc5121_rtc_probe, 418 .probe = mpc5121_rtc_probe,
419 .remove = __devexit_p(mpc5121_rtc_remove), 419 .remove = mpc5121_rtc_remove,
420}; 420};
421 421
422module_platform_driver(mpc5121_rtc_driver); 422module_platform_driver(mpc5121_rtc_driver);
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index f51719bf4a75..578baf9d9725 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -322,8 +322,8 @@ static irqreturn_t mrst_rtc_irq(int irq, void *p)
322 return IRQ_NONE; 322 return IRQ_NONE;
323} 323}
324 324
325static int __devinit 325static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
326vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) 326 int rtc_irq)
327{ 327{
328 int retval = 0; 328 int retval = 0;
329 unsigned char rtc_control; 329 unsigned char rtc_control;
@@ -394,7 +394,7 @@ static void rtc_mrst_do_shutdown(void)
394 spin_unlock_irq(&rtc_lock); 394 spin_unlock_irq(&rtc_lock);
395} 395}
396 396
397static void __devexit rtc_mrst_do_remove(struct device *dev) 397static void rtc_mrst_do_remove(struct device *dev)
398{ 398{
399 struct mrst_rtc *mrst = dev_get_drvdata(dev); 399 struct mrst_rtc *mrst = dev_get_drvdata(dev);
400 struct resource *iomem; 400 struct resource *iomem;
@@ -503,14 +503,14 @@ static inline int mrst_poweroff(struct device *dev)
503 503
504#endif 504#endif
505 505
506static int __devinit vrtc_mrst_platform_probe(struct platform_device *pdev) 506static int vrtc_mrst_platform_probe(struct platform_device *pdev)
507{ 507{
508 return vrtc_mrst_do_probe(&pdev->dev, 508 return vrtc_mrst_do_probe(&pdev->dev,
509 platform_get_resource(pdev, IORESOURCE_MEM, 0), 509 platform_get_resource(pdev, IORESOURCE_MEM, 0),
510 platform_get_irq(pdev, 0)); 510 platform_get_irq(pdev, 0));
511} 511}
512 512
513static int __devexit vrtc_mrst_platform_remove(struct platform_device *pdev) 513static int vrtc_mrst_platform_remove(struct platform_device *pdev)
514{ 514{
515 rtc_mrst_do_remove(&pdev->dev); 515 rtc_mrst_do_remove(&pdev->dev);
516 return 0; 516 return 0;
@@ -528,7 +528,7 @@ MODULE_ALIAS("platform:vrtc_mrst");
528 528
529static struct platform_driver vrtc_mrst_platform_driver = { 529static struct platform_driver vrtc_mrst_platform_driver = {
530 .probe = vrtc_mrst_platform_probe, 530 .probe = vrtc_mrst_platform_probe,
531 .remove = __devexit_p(vrtc_mrst_platform_remove), 531 .remove = vrtc_mrst_platform_remove,
532 .shutdown = vrtc_mrst_platform_shutdown, 532 .shutdown = vrtc_mrst_platform_shutdown,
533 .driver = { 533 .driver = {
534 .name = (char *) driver_name, 534 .name = (char *) driver_name,
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c
index ebc1649d45d6..57233c885998 100644
--- a/drivers/rtc/rtc-mv.c
+++ b/drivers/rtc/rtc-mv.c
@@ -215,7 +215,7 @@ static const struct rtc_class_ops mv_rtc_alarm_ops = {
215 .alarm_irq_enable = mv_rtc_alarm_irq_enable, 215 .alarm_irq_enable = mv_rtc_alarm_irq_enable,
216}; 216};
217 217
218static int __devinit mv_rtc_probe(struct platform_device *pdev) 218static int mv_rtc_probe(struct platform_device *pdev)
219{ 219{
220 struct resource *res; 220 struct resource *res;
221 struct rtc_plat_data *pdata; 221 struct rtc_plat_data *pdata;
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 7304139934aa..1c3ef7289565 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -368,7 +368,7 @@ static struct rtc_class_ops mxc_rtc_ops = {
368 .alarm_irq_enable = mxc_rtc_alarm_irq_enable, 368 .alarm_irq_enable = mxc_rtc_alarm_irq_enable,
369}; 369};
370 370
371static int __devinit mxc_rtc_probe(struct platform_device *pdev) 371static int mxc_rtc_probe(struct platform_device *pdev)
372{ 372{
373 struct resource *res; 373 struct resource *res;
374 struct rtc_device *rtc; 374 struct rtc_device *rtc;
@@ -460,7 +460,7 @@ exit_free_pdata:
460 return ret; 460 return ret;
461} 461}
462 462
463static int __devexit mxc_rtc_remove(struct platform_device *pdev) 463static int mxc_rtc_remove(struct platform_device *pdev)
464{ 464{
465 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 465 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
466 466
@@ -509,7 +509,7 @@ static struct platform_driver mxc_rtc_driver = {
509 }, 509 },
510 .id_table = imx_rtc_devtype, 510 .id_table = imx_rtc_devtype,
511 .probe = mxc_rtc_probe, 511 .probe = mxc_rtc_probe,
512 .remove = __devexit_p(mxc_rtc_remove), 512 .remove = mxc_rtc_remove,
513}; 513};
514 514
515module_platform_driver(mxc_rtc_driver) 515module_platform_driver(mxc_rtc_driver)
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index b79010987d1e..a63680850fef 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -222,7 +222,7 @@ static struct rtc_class_ops nuc900_rtc_ops = {
222 .alarm_irq_enable = nuc900_alarm_irq_enable, 222 .alarm_irq_enable = nuc900_alarm_irq_enable,
223}; 223};
224 224
225static int __devinit nuc900_rtc_probe(struct platform_device *pdev) 225static int nuc900_rtc_probe(struct platform_device *pdev)
226{ 226{
227 struct resource *res; 227 struct resource *res;
228 struct nuc900_rtc *nuc900_rtc; 228 struct nuc900_rtc *nuc900_rtc;
@@ -284,7 +284,7 @@ fail1: kfree(nuc900_rtc);
284 return err; 284 return err;
285} 285}
286 286
287static int __devexit nuc900_rtc_remove(struct platform_device *pdev) 287static int nuc900_rtc_remove(struct platform_device *pdev)
288{ 288{
289 struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev); 289 struct nuc900_rtc *nuc900_rtc = platform_get_drvdata(pdev);
290 struct resource *res; 290 struct resource *res;
@@ -304,7 +304,7 @@ static int __devexit nuc900_rtc_remove(struct platform_device *pdev)
304} 304}
305 305
306static struct platform_driver nuc900_rtc_driver = { 306static struct platform_driver nuc900_rtc_driver = {
307 .remove = __devexit_p(nuc900_rtc_remove), 307 .remove = nuc900_rtc_remove,
308 .driver = { 308 .driver = {
309 .name = "nuc900-rtc", 309 .name = "nuc900-rtc",
310 .owner = THIS_MODULE, 310 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c
index cd4f198cc2ef..e0019cd0bf71 100644
--- a/drivers/rtc/rtc-pcap.c
+++ b/drivers/rtc/rtc-pcap.c
@@ -139,7 +139,7 @@ static const struct rtc_class_ops pcap_rtc_ops = {
139 .alarm_irq_enable = pcap_rtc_alarm_irq_enable, 139 .alarm_irq_enable = pcap_rtc_alarm_irq_enable,
140}; 140};
141 141
142static int __devinit pcap_rtc_probe(struct platform_device *pdev) 142static int pcap_rtc_probe(struct platform_device *pdev)
143{ 143{
144 struct pcap_rtc *pcap_rtc; 144 struct pcap_rtc *pcap_rtc;
145 int timer_irq, alarm_irq; 145 int timer_irq, alarm_irq;
@@ -183,7 +183,7 @@ fail_rtc:
183 return err; 183 return err;
184} 184}
185 185
186static int __devexit pcap_rtc_remove(struct platform_device *pdev) 186static int pcap_rtc_remove(struct platform_device *pdev)
187{ 187{
188 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev); 188 struct pcap_rtc *pcap_rtc = platform_get_drvdata(pdev);
189 189
@@ -196,7 +196,7 @@ static int __devexit pcap_rtc_remove(struct platform_device *pdev)
196} 196}
197 197
198static struct platform_driver pcap_rtc_driver = { 198static struct platform_driver pcap_rtc_driver = {
199 .remove = __devexit_p(pcap_rtc_remove), 199 .remove = pcap_rtc_remove,
200 .driver = { 200 .driver = {
201 .name = "pcap-rtc", 201 .name = "pcap-rtc",
202 .owner = THIS_MODULE, 202 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index 13e4df63974f..02b742afa761 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -219,7 +219,7 @@ static const struct rtc_class_ops pcf2123_rtc_ops = {
219 .set_time = pcf2123_rtc_set_time, 219 .set_time = pcf2123_rtc_set_time,
220}; 220};
221 221
222static int __devinit pcf2123_probe(struct spi_device *spi) 222static int pcf2123_probe(struct spi_device *spi)
223{ 223{
224 struct rtc_device *rtc; 224 struct rtc_device *rtc;
225 struct pcf2123_plat_data *pdata; 225 struct pcf2123_plat_data *pdata;
@@ -319,7 +319,7 @@ kfree_exit:
319 return ret; 319 return ret;
320} 320}
321 321
322static int __devexit pcf2123_remove(struct spi_device *spi) 322static int pcf2123_remove(struct spi_device *spi)
323{ 323{
324 struct pcf2123_plat_data *pdata = spi->dev.platform_data; 324 struct pcf2123_plat_data *pdata = spi->dev.platform_data;
325 int i; 325 int i;
@@ -345,7 +345,7 @@ static struct spi_driver pcf2123_driver = {
345 .owner = THIS_MODULE, 345 .owner = THIS_MODULE,
346 }, 346 },
347 .probe = pcf2123_probe, 347 .probe = pcf2123_probe,
348 .remove = __devexit_p(pcf2123_remove), 348 .remove = pcf2123_remove,
349}; 349};
350 350
351module_spi_driver(pcf2123_driver); 351module_spi_driver(pcf2123_driver);
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c
index a20202f9ee57..e9f3135d305f 100644
--- a/drivers/rtc/rtc-pcf50633.c
+++ b/drivers/rtc/rtc-pcf50633.c
@@ -248,7 +248,7 @@ static void pcf50633_rtc_irq(int irq, void *data)
248 rtc->alarm_pending = 1; 248 rtc->alarm_pending = 1;
249} 249}
250 250
251static int __devinit pcf50633_rtc_probe(struct platform_device *pdev) 251static int pcf50633_rtc_probe(struct platform_device *pdev)
252{ 252{
253 struct pcf50633_rtc *rtc; 253 struct pcf50633_rtc *rtc;
254 254
@@ -272,7 +272,7 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
272 return 0; 272 return 0;
273} 273}
274 274
275static int __devexit pcf50633_rtc_remove(struct platform_device *pdev) 275static int pcf50633_rtc_remove(struct platform_device *pdev)
276{ 276{
277 struct pcf50633_rtc *rtc; 277 struct pcf50633_rtc *rtc;
278 278
@@ -291,7 +291,7 @@ static struct platform_driver pcf50633_rtc_driver = {
291 .name = "pcf50633-rtc", 291 .name = "pcf50633-rtc",
292 }, 292 },
293 .probe = pcf50633_rtc_probe, 293 .probe = pcf50633_rtc_probe,
294 .remove = __devexit_p(pcf50633_rtc_remove), 294 .remove = pcf50633_rtc_remove,
295}; 295};
296 296
297module_platform_driver(pcf50633_rtc_driver); 297module_platform_driver(pcf50633_rtc_driver);
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index 98e3a2b681e6..7098ee89bd29 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -296,7 +296,7 @@ static const struct i2c_device_id pcf8563_id[] = {
296MODULE_DEVICE_TABLE(i2c, pcf8563_id); 296MODULE_DEVICE_TABLE(i2c, pcf8563_id);
297 297
298#ifdef CONFIG_OF 298#ifdef CONFIG_OF
299static const struct of_device_id pcf8563_of_match[] __devinitconst = { 299static const struct of_device_id pcf8563_of_match[] = {
300 { .compatible = "nxp,pcf8563" }, 300 { .compatible = "nxp,pcf8563" },
301 {} 301 {}
302}; 302};
diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c
index 019ff3571168..3415b8f18555 100644
--- a/drivers/rtc/rtc-pcf8583.c
+++ b/drivers/rtc/rtc-pcf8583.c
@@ -294,7 +294,7 @@ exit_kfree:
294 return err; 294 return err;
295} 295}
296 296
297static int __devexit pcf8583_remove(struct i2c_client *client) 297static int pcf8583_remove(struct i2c_client *client)
298{ 298{
299 struct pcf8583 *pcf8583 = i2c_get_clientdata(client); 299 struct pcf8583 *pcf8583 = i2c_get_clientdata(client);
300 300
@@ -316,7 +316,7 @@ static struct i2c_driver pcf8583_driver = {
316 .owner = THIS_MODULE, 316 .owner = THIS_MODULE,
317 }, 317 },
318 .probe = pcf8583_probe, 318 .probe = pcf8583_probe,
319 .remove = __devexit_p(pcf8583_remove), 319 .remove = pcf8583_remove,
320 .id_table = pcf8583_id, 320 .id_table = pcf8583_id,
321}; 321};
322 322
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index d00bd24342a3..f1a6557261f3 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -382,7 +382,7 @@ rtc_alarm_handled:
382 return IRQ_HANDLED; 382 return IRQ_HANDLED;
383} 383}
384 384
385static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev) 385static int pm8xxx_rtc_probe(struct platform_device *pdev)
386{ 386{
387 int rc; 387 int rc;
388 u8 ctrl_reg; 388 u8 ctrl_reg;
@@ -485,7 +485,7 @@ fail_rtc_enable:
485 return rc; 485 return rc;
486} 486}
487 487
488static int __devexit pm8xxx_rtc_remove(struct platform_device *pdev) 488static int pm8xxx_rtc_remove(struct platform_device *pdev)
489{ 489{
490 struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev); 490 struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
491 491
@@ -524,7 +524,7 @@ static SIMPLE_DEV_PM_OPS(pm8xxx_rtc_pm_ops, pm8xxx_rtc_suspend, pm8xxx_rtc_resum
524 524
525static struct platform_driver pm8xxx_rtc_driver = { 525static struct platform_driver pm8xxx_rtc_driver = {
526 .probe = pm8xxx_rtc_probe, 526 .probe = pm8xxx_rtc_probe,
527 .remove = __devexit_p(pm8xxx_rtc_remove), 527 .remove = pm8xxx_rtc_remove,
528 .driver = { 528 .driver = {
529 .name = PM8XXX_RTC_DEV_NAME, 529 .name = PM8XXX_RTC_DEV_NAME,
530 .owner = THIS_MODULE, 530 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c
index ab0acaeb2371..0407e13d4de4 100644
--- a/drivers/rtc/rtc-puv3.c
+++ b/drivers/rtc/rtc-puv3.c
@@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en)
220 } 220 }
221} 221}
222 222
223static int __devexit puv3_rtc_remove(struct platform_device *dev) 223static int puv3_rtc_remove(struct platform_device *dev)
224{ 224{
225 struct rtc_device *rtc = platform_get_drvdata(dev); 225 struct rtc_device *rtc = platform_get_drvdata(dev);
226 226
@@ -236,7 +236,7 @@ static int __devexit puv3_rtc_remove(struct platform_device *dev)
236 return 0; 236 return 0;
237} 237}
238 238
239static int __devinit puv3_rtc_probe(struct platform_device *pdev) 239static int puv3_rtc_probe(struct platform_device *pdev)
240{ 240{
241 struct rtc_device *rtc; 241 struct rtc_device *rtc;
242 struct resource *res; 242 struct resource *res;
@@ -328,7 +328,7 @@ static int puv3_rtc_resume(struct platform_device *pdev)
328 328
329static struct platform_driver puv3_rtc_driver = { 329static struct platform_driver puv3_rtc_driver = {
330 .probe = puv3_rtc_probe, 330 .probe = puv3_rtc_probe,
331 .remove = __devexit_p(puv3_rtc_remove), 331 .remove = puv3_rtc_remove,
332 .suspend = puv3_rtc_suspend, 332 .suspend = puv3_rtc_suspend,
333 .resume = puv3_rtc_resume, 333 .resume = puv3_rtc_resume,
334 .driver = { 334 .driver = {
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 2c183ebff715..7726f4a4f2d0 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -119,7 +119,7 @@ static const struct rtc_class_ops r9701_rtc_ops = {
119 .set_time = r9701_set_datetime, 119 .set_time = r9701_set_datetime,
120}; 120};
121 121
122static int __devinit r9701_probe(struct spi_device *spi) 122static int r9701_probe(struct spi_device *spi)
123{ 123{
124 struct rtc_device *rtc; 124 struct rtc_device *rtc;
125 struct rtc_time dt; 125 struct rtc_time dt;
@@ -164,7 +164,7 @@ static int __devinit r9701_probe(struct spi_device *spi)
164 return 0; 164 return 0;
165} 165}
166 166
167static int __devexit r9701_remove(struct spi_device *spi) 167static int r9701_remove(struct spi_device *spi)
168{ 168{
169 struct rtc_device *rtc = dev_get_drvdata(&spi->dev); 169 struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
170 170
@@ -178,7 +178,7 @@ static struct spi_driver r9701_driver = {
178 .owner = THIS_MODULE, 178 .owner = THIS_MODULE,
179 }, 179 },
180 .probe = r9701_probe, 180 .probe = r9701_probe,
181 .remove = __devexit_p(r9701_remove), 181 .remove = r9701_remove,
182}; 182};
183 183
184module_spi_driver(r9701_driver); 184module_spi_driver(r9701_driver);
diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c
index cdb140c29c56..eb3194d664a8 100644
--- a/drivers/rtc/rtc-rc5t583.c
+++ b/drivers/rtc/rtc-rc5t583.c
@@ -211,7 +211,7 @@ static const struct rtc_class_ops rc5t583_rtc_ops = {
211 .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable, 211 .alarm_irq_enable = rc5t583_rtc_alarm_irq_enable,
212}; 212};
213 213
214static int __devinit rc5t583_rtc_probe(struct platform_device *pdev) 214static int rc5t583_rtc_probe(struct platform_device *pdev)
215{ 215{
216 struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); 216 struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent);
217 struct rc5t583_rtc *ricoh_rtc; 217 struct rc5t583_rtc *ricoh_rtc;
@@ -271,7 +271,7 @@ static int __devinit rc5t583_rtc_probe(struct platform_device *pdev)
271 * Disable rc5t583 RTC interrupts. 271 * Disable rc5t583 RTC interrupts.
272 * Sets status flag to free. 272 * Sets status flag to free.
273 */ 273 */
274static int __devexit rc5t583_rtc_remove(struct platform_device *pdev) 274static int rc5t583_rtc_remove(struct platform_device *pdev)
275{ 275{
276 struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev); 276 struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev);
277 277
@@ -317,7 +317,7 @@ static const struct dev_pm_ops rc5t583_rtc_pm_ops = {
317 317
318static struct platform_driver rc5t583_rtc_driver = { 318static struct platform_driver rc5t583_rtc_driver = {
319 .probe = rc5t583_rtc_probe, 319 .probe = rc5t583_rtc_probe,
320 .remove = __devexit_p(rc5t583_rtc_remove), 320 .remove = rc5t583_rtc_remove,
321 .driver = { 321 .driver = {
322 .owner = THIS_MODULE, 322 .owner = THIS_MODULE,
323 .name = "rtc-rc5t583", 323 .name = "rtc-rc5t583",
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c
index e3ff179b99ca..d1aee793ecc8 100644
--- a/drivers/rtc/rtc-rs5c313.c
+++ b/drivers/rtc/rtc-rs5c313.c
@@ -377,7 +377,7 @@ static int rs5c313_rtc_probe(struct platform_device *pdev)
377 return 0; 377 return 0;
378} 378}
379 379
380static int __devexit rs5c313_rtc_remove(struct platform_device *pdev) 380static int rs5c313_rtc_remove(struct platform_device *pdev)
381{ 381{
382 struct rtc_device *rtc = platform_get_drvdata( pdev ); 382 struct rtc_device *rtc = platform_get_drvdata( pdev );
383 383
@@ -392,7 +392,7 @@ static struct platform_driver rs5c313_rtc_platform_driver = {
392 .owner = THIS_MODULE, 392 .owner = THIS_MODULE,
393 }, 393 },
394 .probe = rs5c313_rtc_probe, 394 .probe = rs5c313_rtc_probe,
395 .remove = __devexit_p( rs5c313_rtc_remove ), 395 .remove = rs5c313_rtc_remove,
396}; 396};
397 397
398static int __init rs5c313_rtc_init(void) 398static int __init rs5c313_rtc_init(void)
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index fd5c7af04ae5..72ef10be8662 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -152,7 +152,7 @@ static const struct rtc_class_ops rs5c348_rtc_ops = {
152 152
153static struct spi_driver rs5c348_driver; 153static struct spi_driver rs5c348_driver;
154 154
155static int __devinit rs5c348_probe(struct spi_device *spi) 155static int rs5c348_probe(struct spi_device *spi)
156{ 156{
157 int ret; 157 int ret;
158 struct rtc_device *rtc; 158 struct rtc_device *rtc;
@@ -218,7 +218,7 @@ static int __devinit rs5c348_probe(struct spi_device *spi)
218 return ret; 218 return ret;
219} 219}
220 220
221static int __devexit rs5c348_remove(struct spi_device *spi) 221static int rs5c348_remove(struct spi_device *spi)
222{ 222{
223 struct rs5c348_plat_data *pdata = spi->dev.platform_data; 223 struct rs5c348_plat_data *pdata = spi->dev.platform_data;
224 struct rtc_device *rtc = pdata->rtc; 224 struct rtc_device *rtc = pdata->rtc;
@@ -235,7 +235,7 @@ static struct spi_driver rs5c348_driver = {
235 .owner = THIS_MODULE, 235 .owner = THIS_MODULE,
236 }, 236 },
237 .probe = rs5c348_probe, 237 .probe = rs5c348_probe,
238 .remove = __devexit_p(rs5c348_remove), 238 .remove = rs5c348_remove,
239}; 239};
240 240
241module_spi_driver(rs5c348_driver); 241module_spi_driver(rs5c348_driver);
diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index 0fbe57b2f6d2..f8ee8ad7825e 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -385,8 +385,8 @@ static struct i2c_device_id rv3029c2_id[] = {
385}; 385};
386MODULE_DEVICE_TABLE(i2c, rv3029c2_id); 386MODULE_DEVICE_TABLE(i2c, rv3029c2_id);
387 387
388static int __devinit 388static int rv3029c2_probe(struct i2c_client *client,
389rv3029c2_probe(struct i2c_client *client, const struct i2c_device_id *id) 389 const struct i2c_device_id *id)
390{ 390{
391 struct rtc_device *rtc; 391 struct rtc_device *rtc;
392 int rc = 0; 392 int rc = 0;
@@ -418,7 +418,7 @@ exit_unregister:
418 return rc; 418 return rc;
419} 419}
420 420
421static int __devexit rv3029c2_remove(struct i2c_client *client) 421static int rv3029c2_remove(struct i2c_client *client)
422{ 422{
423 struct rtc_device *rtc = i2c_get_clientdata(client); 423 struct rtc_device *rtc = i2c_get_clientdata(client);
424 424
@@ -432,7 +432,7 @@ static struct i2c_driver rv3029c2_driver = {
432 .name = "rtc-rv3029c2", 432 .name = "rtc-rv3029c2",
433 }, 433 },
434 .probe = rv3029c2_probe, 434 .probe = rv3029c2_probe,
435 .remove = __devexit_p(rv3029c2_remove), 435 .remove = rv3029c2_remove,
436 .id_table = rv3029c2_id, 436 .id_table = rv3029c2_id,
437}; 437};
438 438
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index 0de902dc1cd5..0722d36b9c9a 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -534,8 +534,8 @@ static void rx8025_sysfs_unregister(struct device *dev)
534 device_remove_file(dev, &dev_attr_clock_adjust_ppb); 534 device_remove_file(dev, &dev_attr_clock_adjust_ppb);
535} 535}
536 536
537static int __devinit rx8025_probe(struct i2c_client *client, 537static int rx8025_probe(struct i2c_client *client,
538 const struct i2c_device_id *id) 538 const struct i2c_device_id *id)
539{ 539{
540 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 540 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
541 struct rx8025_data *rx8025; 541 struct rx8025_data *rx8025;
@@ -614,7 +614,7 @@ errout:
614 return err; 614 return err;
615} 615}
616 616
617static int __devexit rx8025_remove(struct i2c_client *client) 617static int rx8025_remove(struct i2c_client *client)
618{ 618{
619 struct rx8025_data *rx8025 = i2c_get_clientdata(client); 619 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
620 struct mutex *lock = &rx8025->rtc->ops_lock; 620 struct mutex *lock = &rx8025->rtc->ops_lock;
@@ -640,7 +640,7 @@ static struct i2c_driver rx8025_driver = {
640 .owner = THIS_MODULE, 640 .owner = THIS_MODULE,
641 }, 641 },
642 .probe = rx8025_probe, 642 .probe = rx8025_probe,
643 .remove = __devexit_p(rx8025_remove), 643 .remove = rx8025_remove,
644 .id_table = rx8025_id, 644 .id_table = rx8025_id,
645}; 645};
646 646
diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
index d84825124a7a..b0c272658fa2 100644
--- a/drivers/rtc/rtc-rx8581.c
+++ b/drivers/rtc/rtc-rx8581.c
@@ -228,8 +228,8 @@ static const struct rtc_class_ops rx8581_rtc_ops = {
228 .set_time = rx8581_rtc_set_time, 228 .set_time = rx8581_rtc_set_time,
229}; 229};
230 230
231static int __devinit rx8581_probe(struct i2c_client *client, 231static int rx8581_probe(struct i2c_client *client,
232 const struct i2c_device_id *id) 232 const struct i2c_device_id *id)
233{ 233{
234 struct rtc_device *rtc; 234 struct rtc_device *rtc;
235 235
@@ -251,7 +251,7 @@ static int __devinit rx8581_probe(struct i2c_client *client,
251 return 0; 251 return 0;
252} 252}
253 253
254static int __devexit rx8581_remove(struct i2c_client *client) 254static int rx8581_remove(struct i2c_client *client)
255{ 255{
256 struct rtc_device *rtc = i2c_get_clientdata(client); 256 struct rtc_device *rtc = i2c_get_clientdata(client);
257 257
@@ -272,7 +272,7 @@ static struct i2c_driver rx8581_driver = {
272 .owner = THIS_MODULE, 272 .owner = THIS_MODULE,
273 }, 273 },
274 .probe = rx8581_probe, 274 .probe = rx8581_probe,
275 .remove = __devexit_p(rx8581_remove), 275 .remove = rx8581_remove,
276 .id_table = rx8581_id, 276 .id_table = rx8581_id,
277}; 277};
278 278
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 4bd9414aee65..404651464d45 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -421,7 +421,7 @@ static void s3c_rtc_enable(struct platform_device *pdev, int en)
421 clk_disable(rtc_clk); 421 clk_disable(rtc_clk);
422} 422}
423 423
424static int __devexit s3c_rtc_remove(struct platform_device *dev) 424static int s3c_rtc_remove(struct platform_device *dev)
425{ 425{
426 struct rtc_device *rtc = platform_get_drvdata(dev); 426 struct rtc_device *rtc = platform_get_drvdata(dev);
427 427
@@ -451,7 +451,7 @@ static inline int s3c_rtc_get_driver_data(struct platform_device *pdev)
451 return platform_get_device_id(pdev)->driver_data; 451 return platform_get_device_id(pdev)->driver_data;
452} 452}
453 453
454static int __devinit s3c_rtc_probe(struct platform_device *pdev) 454static int s3c_rtc_probe(struct platform_device *pdev)
455{ 455{
456 struct rtc_device *rtc; 456 struct rtc_device *rtc;
457 struct rtc_time rtc_tm; 457 struct rtc_time rtc_tm;
@@ -686,7 +686,7 @@ MODULE_DEVICE_TABLE(platform, s3c_rtc_driver_ids);
686 686
687static struct platform_driver s3c_rtc_driver = { 687static struct platform_driver s3c_rtc_driver = {
688 .probe = s3c_rtc_probe, 688 .probe = s3c_rtc_probe,
689 .remove = __devexit_p(s3c_rtc_remove), 689 .remove = s3c_rtc_remove,
690 .suspend = s3c_rtc_suspend, 690 .suspend = s3c_rtc_suspend,
691 .resume = s3c_rtc_resume, 691 .resume = s3c_rtc_resume,
692 .id_table = s3c_rtc_driver_ids, 692 .id_table = s3c_rtc_driver_ids,
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index 3c0da333f465..d5ec7854a651 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -241,7 +241,7 @@ static irqreturn_t snvs_rtc_irq_handler(int irq, void *dev_id)
241 return events ? IRQ_HANDLED : IRQ_NONE; 241 return events ? IRQ_HANDLED : IRQ_NONE;
242} 242}
243 243
244static int __devinit snvs_rtc_probe(struct platform_device *pdev) 244static int snvs_rtc_probe(struct platform_device *pdev)
245{ 245{
246 struct snvs_rtc_data *data; 246 struct snvs_rtc_data *data;
247 struct resource *res; 247 struct resource *res;
@@ -294,7 +294,7 @@ static int __devinit snvs_rtc_probe(struct platform_device *pdev)
294 return 0; 294 return 0;
295} 295}
296 296
297static int __devexit snvs_rtc_remove(struct platform_device *pdev) 297static int snvs_rtc_remove(struct platform_device *pdev)
298{ 298{
299 struct snvs_rtc_data *data = platform_get_drvdata(pdev); 299 struct snvs_rtc_data *data = platform_get_drvdata(pdev);
300 300
@@ -327,7 +327,7 @@ static int snvs_rtc_resume(struct device *dev)
327 327
328static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume); 328static SIMPLE_DEV_PM_OPS(snvs_rtc_pm_ops, snvs_rtc_suspend, snvs_rtc_resume);
329 329
330static const struct of_device_id __devinitconst snvs_dt_ids[] = { 330static const struct of_device_id snvs_dt_ids[] = {
331 { .compatible = "fsl,sec-v4.0-mon-rtc-lp", }, 331 { .compatible = "fsl,sec-v4.0-mon-rtc-lp", },
332 { /* sentinel */ } 332 { /* sentinel */ }
333}; 333};
@@ -341,7 +341,7 @@ static struct platform_driver snvs_rtc_driver = {
341 .of_match_table = snvs_dt_ids, 341 .of_match_table = snvs_dt_ids,
342 }, 342 },
343 .probe = snvs_rtc_probe, 343 .probe = snvs_rtc_probe,
344 .remove = __devexit_p(snvs_rtc_remove), 344 .remove = snvs_rtc_remove,
345}; 345};
346module_platform_driver(snvs_rtc_driver); 346module_platform_driver(snvs_rtc_driver);
347 347
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index 141fc945295f..c2121b5a01f2 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -351,7 +351,7 @@ static struct rtc_class_ops spear_rtc_ops = {
351 .alarm_irq_enable = spear_alarm_irq_enable, 351 .alarm_irq_enable = spear_alarm_irq_enable,
352}; 352};
353 353
354static int __devinit spear_rtc_probe(struct platform_device *pdev) 354static int spear_rtc_probe(struct platform_device *pdev)
355{ 355{
356 struct resource *res; 356 struct resource *res;
357 struct spear_rtc_config *config; 357 struct spear_rtc_config *config;
@@ -425,7 +425,7 @@ err_disable_clock:
425 return status; 425 return status;
426} 426}
427 427
428static int __devexit spear_rtc_remove(struct platform_device *pdev) 428static int spear_rtc_remove(struct platform_device *pdev)
429{ 429{
430 struct spear_rtc_config *config = platform_get_drvdata(pdev); 430 struct spear_rtc_config *config = platform_get_drvdata(pdev);
431 431
@@ -499,7 +499,7 @@ MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
499 499
500static struct platform_driver spear_rtc_driver = { 500static struct platform_driver spear_rtc_driver = {
501 .probe = spear_rtc_probe, 501 .probe = spear_rtc_probe,
502 .remove = __devexit_p(spear_rtc_remove), 502 .remove = spear_rtc_remove,
503 .suspend = spear_rtc_suspend, 503 .suspend = spear_rtc_suspend,
504 .resume = spear_rtc_resume, 504 .resume = spear_rtc_resume,
505 .shutdown = spear_rtc_shutdown, 505 .shutdown = spear_rtc_shutdown,
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 279f5cfa691a..7e4a6f65cb91 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -285,7 +285,7 @@ static struct bin_attribute stk17ta8_nvram_attr = {
285 .write = stk17ta8_nvram_write, 285 .write = stk17ta8_nvram_write,
286}; 286};
287 287
288static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev) 288static int stk17ta8_rtc_probe(struct platform_device *pdev)
289{ 289{
290 struct resource *res; 290 struct resource *res;
291 unsigned int cal; 291 unsigned int cal;
@@ -347,7 +347,7 @@ static int __devinit stk17ta8_rtc_probe(struct platform_device *pdev)
347 return ret; 347 return ret;
348} 348}
349 349
350static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev) 350static int stk17ta8_rtc_remove(struct platform_device *pdev)
351{ 351{
352 struct rtc_plat_data *pdata = platform_get_drvdata(pdev); 352 struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
353 353
@@ -363,7 +363,7 @@ MODULE_ALIAS("platform:stk17ta8");
363 363
364static struct platform_driver stk17ta8_rtc_driver = { 364static struct platform_driver stk17ta8_rtc_driver = {
365 .probe = stk17ta8_rtc_probe, 365 .probe = stk17ta8_rtc_probe,
366 .remove = __devexit_p(stk17ta8_rtc_remove), 366 .remove = stk17ta8_rtc_remove,
367 .driver = { 367 .driver = {
368 .name = "stk17ta8", 368 .name = "stk17ta8",
369 .owner = THIS_MODULE, 369 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index c006025cecc8..c84ea6659f49 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -303,7 +303,13 @@ static struct rtc_class_ops tegra_rtc_ops = {
303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable, 303 .alarm_irq_enable = tegra_rtc_alarm_irq_enable,
304}; 304};
305 305
306static int __devinit tegra_rtc_probe(struct platform_device *pdev) 306static const struct of_device_id tegra_rtc_dt_match[] = {
307 { .compatible = "nvidia,tegra20-rtc", },
308 {}
309};
310MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
311
312static int tegra_rtc_probe(struct platform_device *pdev)
307{ 313{
308 struct tegra_rtc_info *info; 314 struct tegra_rtc_info *info;
309 struct resource *res; 315 struct resource *res;
@@ -375,7 +381,7 @@ err_dev_unreg:
375 return ret; 381 return ret;
376} 382}
377 383
378static int __devexit tegra_rtc_remove(struct platform_device *pdev) 384static int tegra_rtc_remove(struct platform_device *pdev)
379{ 385{
380 struct tegra_rtc_info *info = platform_get_drvdata(pdev); 386 struct tegra_rtc_info *info = platform_get_drvdata(pdev);
381 387
@@ -435,11 +441,12 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
435 441
436MODULE_ALIAS("platform:tegra_rtc"); 442MODULE_ALIAS("platform:tegra_rtc");
437static struct platform_driver tegra_rtc_driver = { 443static struct platform_driver tegra_rtc_driver = {
438 .remove = __devexit_p(tegra_rtc_remove), 444 .remove = tegra_rtc_remove,
439 .shutdown = tegra_rtc_shutdown, 445 .shutdown = tegra_rtc_shutdown,
440 .driver = { 446 .driver = {
441 .name = "tegra_rtc", 447 .name = "tegra_rtc",
442 .owner = THIS_MODULE, 448 .owner = THIS_MODULE,
449 .of_match_table = tegra_rtc_dt_match,
443 }, 450 },
444#ifdef CONFIG_PM 451#ifdef CONFIG_PM
445 .suspend = tegra_rtc_suspend, 452 .suspend = tegra_rtc_suspend,
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 974b9ae252ab..b92e0f6383e6 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -119,7 +119,7 @@ err:
119 return err; 119 return err;
120} 120}
121 121
122static int __devexit test_remove(struct platform_device *plat_dev) 122static int test_remove(struct platform_device *plat_dev)
123{ 123{
124 struct rtc_device *rtc = platform_get_drvdata(plat_dev); 124 struct rtc_device *rtc = platform_get_drvdata(plat_dev);
125 125
@@ -131,7 +131,7 @@ static int __devexit test_remove(struct platform_device *plat_dev)
131 131
132static struct platform_driver test_driver = { 132static struct platform_driver test_driver = {
133 .probe = test_probe, 133 .probe = test_probe,
134 .remove = __devexit_p(test_remove), 134 .remove = test_remove,
135 .driver = { 135 .driver = {
136 .name = "rtc-test", 136 .name = "rtc-test",
137 .owner = THIS_MODULE, 137 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c
index eb65dafee66e..62db4841078b 100644
--- a/drivers/rtc/rtc-tile.c
+++ b/drivers/rtc/rtc-tile.c
@@ -76,7 +76,7 @@ static const struct rtc_class_ops tile_rtc_ops = {
76/* 76/*
77 * Device probe routine. 77 * Device probe routine.
78 */ 78 */
79static int __devinit tile_rtc_probe(struct platform_device *dev) 79static int tile_rtc_probe(struct platform_device *dev)
80{ 80{
81 struct rtc_device *rtc; 81 struct rtc_device *rtc;
82 82
@@ -94,7 +94,7 @@ static int __devinit tile_rtc_probe(struct platform_device *dev)
94/* 94/*
95 * Device cleanup routine. 95 * Device cleanup routine.
96 */ 96 */
97static int __devexit tile_rtc_remove(struct platform_device *dev) 97static int tile_rtc_remove(struct platform_device *dev)
98{ 98{
99 struct rtc_device *rtc = platform_get_drvdata(dev); 99 struct rtc_device *rtc = platform_get_drvdata(dev);
100 100
@@ -112,7 +112,7 @@ static struct platform_driver tile_rtc_platform_driver = {
112 .owner = THIS_MODULE, 112 .owner = THIS_MODULE,
113 }, 113 },
114 .probe = tile_rtc_probe, 114 .probe = tile_rtc_probe,
115 .remove = __devexit_p(tile_rtc_remove), 115 .remove = tile_rtc_remove,
116}; 116};
117 117
118/* 118/*
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
new file mode 100644
index 000000000000..70f61b8e9e6f
--- /dev/null
+++ b/drivers/rtc/rtc-tps6586x.c
@@ -0,0 +1,356 @@
1/*
2 * rtc-tps6586x.c: RTC driver for TI PMIC TPS6586X
3 *
4 * Copyright (c) 2012, NVIDIA Corporation.
5 *
6 * Author: Laxman Dewangan <ldewangan@nvidia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation version 2.
11 *
12 * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
13 * whether express or implied; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 * 02111-1307, USA
21 */
22
23#include <linux/device.h>
24#include <linux/err.h>
25#include <linux/init.h>
26#include <linux/kernel.h>
27#include <linux/mfd/tps6586x.h>
28#include <linux/module.h>
29#include <linux/platform_device.h>
30#include <linux/pm_runtime.h>
31#include <linux/rtc.h>
32#include <linux/slab.h>
33
34#define RTC_CTRL 0xc0
35#define POR_RESET_N BIT(7)
36#define OSC_SRC_SEL BIT(6)
37#define RTC_ENABLE BIT(5) /* enables alarm */
38#define RTC_BUF_ENABLE BIT(4) /* 32 KHz buffer enable */
39#define PRE_BYPASS BIT(3) /* 0=1KHz or 1=32KHz updates */
40#define CL_SEL_MASK (BIT(2)|BIT(1))
41#define CL_SEL_POS 1
42#define RTC_ALARM1_HI 0xc1
43#define RTC_COUNT4 0xc6
44
45/* start a PMU RTC access by reading the register prior to the RTC_COUNT4 */
46#define RTC_COUNT4_DUMMYREAD 0xc5
47
48/*only 14-bits width in second*/
49#define ALM1_VALID_RANGE_IN_SEC 0x3FFF
50
51#define TPS6586X_RTC_CL_SEL_1_5PF 0x0
52#define TPS6586X_RTC_CL_SEL_6_5PF 0x1
53#define TPS6586X_RTC_CL_SEL_7_5PF 0x2
54#define TPS6586X_RTC_CL_SEL_12_5PF 0x3
55
56struct tps6586x_rtc {
57 struct device *dev;
58 struct rtc_device *rtc;
59 int irq;
60 bool irq_en;
61 unsigned long long epoch_start;
62};
63
64static inline struct device *to_tps6586x_dev(struct device *dev)
65{
66 return dev->parent;
67}
68
69static int tps6586x_rtc_read_time(struct device *dev, struct rtc_time *tm)
70{
71 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
72 struct device *tps_dev = to_tps6586x_dev(dev);
73 unsigned long long ticks = 0;
74 unsigned long seconds;
75 u8 buff[6];
76 int ret;
77 int i;
78
79 ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD, sizeof(buff), buff);
80 if (ret < 0) {
81 dev_err(dev, "read counter failed with err %d\n", ret);
82 return ret;
83 }
84
85 for (i = 1; i < sizeof(buff); i++) {
86 ticks <<= 8;
87 ticks |= buff[i];
88 }
89
90 seconds = ticks >> 10;
91 seconds += rtc->epoch_start;
92 rtc_time_to_tm(seconds, tm);
93 return rtc_valid_tm(tm);
94}
95
96static int tps6586x_rtc_set_time(struct device *dev, struct rtc_time *tm)
97{
98 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
99 struct device *tps_dev = to_tps6586x_dev(dev);
100 unsigned long long ticks;
101 unsigned long seconds;
102 u8 buff[5];
103 int ret;
104
105 rtc_tm_to_time(tm, &seconds);
106 if (seconds < rtc->epoch_start) {
107 dev_err(dev, "requested time unsupported\n");
108 return -EINVAL;
109 }
110 seconds -= rtc->epoch_start;
111
112 ticks = (unsigned long long)seconds << 10;
113 buff[0] = (ticks >> 32) & 0xff;
114 buff[1] = (ticks >> 24) & 0xff;
115 buff[2] = (ticks >> 16) & 0xff;
116 buff[3] = (ticks >> 8) & 0xff;
117 buff[4] = ticks & 0xff;
118
119 /* Disable RTC before changing time */
120 ret = tps6586x_clr_bits(tps_dev, RTC_CTRL, RTC_ENABLE);
121 if (ret < 0) {
122 dev_err(dev, "failed to clear RTC_ENABLE\n");
123 return ret;
124 }
125
126 ret = tps6586x_writes(tps_dev, RTC_COUNT4, sizeof(buff), buff);
127 if (ret < 0) {
128 dev_err(dev, "failed to program new time\n");
129 return ret;
130 }
131
132 /* Enable RTC */
133 ret = tps6586x_set_bits(tps_dev, RTC_CTRL, RTC_ENABLE);
134 if (ret < 0) {
135 dev_err(dev, "failed to set RTC_ENABLE\n");
136 return ret;
137 }
138 return 0;
139}
140
141static int tps6586x_rtc_alarm_irq_enable(struct device *dev,
142 unsigned int enabled)
143{
144 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
145
146 if (enabled && !rtc->irq_en) {
147 enable_irq(rtc->irq);
148 rtc->irq_en = true;
149 } else if (!enabled && rtc->irq_en) {
150 disable_irq(rtc->irq);
151 rtc->irq_en = false;
152 }
153 return 0;
154}
155
156static int tps6586x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
157{
158 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
159 struct device *tps_dev = to_tps6586x_dev(dev);
160 unsigned long seconds;
161 unsigned long ticks;
162 unsigned long rtc_current_time;
163 unsigned long long rticks = 0;
164 u8 buff[3];
165 u8 rbuff[6];
166 int ret;
167 int i;
168
169 rtc_tm_to_time(&alrm->time, &seconds);
170
171 if (alrm->enabled && (seconds < rtc->epoch_start)) {
172 dev_err(dev, "can't set alarm to requested time\n");
173 return -EINVAL;
174 }
175
176 ret = tps6586x_rtc_alarm_irq_enable(dev, alrm->enabled);
177 if (ret < 0) {
178 dev_err(dev, "can't set alarm irq, err %d\n", ret);
179 return ret;
180 }
181
182 seconds -= rtc->epoch_start;
183 ret = tps6586x_reads(tps_dev, RTC_COUNT4_DUMMYREAD,
184 sizeof(rbuff), rbuff);
185 if (ret < 0) {
186 dev_err(dev, "read counter failed with err %d\n", ret);
187 return ret;
188 }
189
190 for (i = 1; i < sizeof(rbuff); i++) {
191 rticks <<= 8;
192 rticks |= rbuff[i];
193 }
194
195 rtc_current_time = rticks >> 10;
196 if ((seconds - rtc_current_time) > ALM1_VALID_RANGE_IN_SEC)
197 seconds = rtc_current_time - 1;
198
199 ticks = (unsigned long long)seconds << 10;
200 buff[0] = (ticks >> 16) & 0xff;
201 buff[1] = (ticks >> 8) & 0xff;
202 buff[2] = ticks & 0xff;
203
204 ret = tps6586x_writes(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff);
205 if (ret)
206 dev_err(dev, "programming alarm failed with err %d\n", ret);
207
208 return ret;
209}
210
211static int tps6586x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
212{
213 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
214 struct device *tps_dev = to_tps6586x_dev(dev);
215 unsigned long ticks;
216 unsigned long seconds;
217 u8 buff[3];
218 int ret;
219
220 ret = tps6586x_reads(tps_dev, RTC_ALARM1_HI, sizeof(buff), buff);
221 if (ret) {
222 dev_err(dev, "read RTC_ALARM1_HI failed with err %d\n", ret);
223 return ret;
224 }
225
226 ticks = (buff[0] << 16) | (buff[1] << 8) | buff[2];
227 seconds = ticks >> 10;
228 seconds += rtc->epoch_start;
229
230 rtc_time_to_tm(seconds, &alrm->time);
231 return 0;
232}
233
234static const struct rtc_class_ops tps6586x_rtc_ops = {
235 .read_time = tps6586x_rtc_read_time,
236 .set_time = tps6586x_rtc_set_time,
237 .set_alarm = tps6586x_rtc_set_alarm,
238 .read_alarm = tps6586x_rtc_read_alarm,
239 .alarm_irq_enable = tps6586x_rtc_alarm_irq_enable,
240};
241
242static irqreturn_t tps6586x_rtc_irq(int irq, void *data)
243{
244 struct tps6586x_rtc *rtc = data;
245
246 rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF);
247 return IRQ_HANDLED;
248}
249
250static int tps6586x_rtc_probe(struct platform_device *pdev)
251{
252 struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
253 struct tps6586x_rtc *rtc;
254 int ret;
255
256 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
257 if (!rtc)
258 return -ENOMEM;
259
260 rtc->dev = &pdev->dev;
261 rtc->irq = platform_get_irq(pdev, 0);
262
263 /* Set epoch start as 00:00:00:01:01:2009 */
264 rtc->epoch_start = mktime(2009, 1, 1, 0, 0, 0);
265
266 /* 1 kHz tick mode, enable tick counting */
267 ret = tps6586x_update(tps_dev, RTC_CTRL,
268 RTC_ENABLE | OSC_SRC_SEL |
269 ((TPS6586X_RTC_CL_SEL_1_5PF << CL_SEL_POS) & CL_SEL_MASK),
270 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
271 if (ret < 0) {
272 dev_err(&pdev->dev, "unable to start counter\n");
273 return ret;
274 }
275
276 platform_set_drvdata(pdev, rtc);
277 rtc->rtc = rtc_device_register(dev_name(&pdev->dev), &pdev->dev,
278 &tps6586x_rtc_ops, THIS_MODULE);
279 if (IS_ERR(rtc->rtc)) {
280 ret = PTR_ERR(rtc->rtc);
281 dev_err(&pdev->dev, "RTC device register: ret %d\n", ret);
282 goto fail_rtc_register;
283 }
284
285 ret = request_threaded_irq(rtc->irq, NULL, tps6586x_rtc_irq,
286 IRQF_ONESHOT | IRQF_EARLY_RESUME,
287 dev_name(&pdev->dev), rtc);
288 if (ret < 0) {
289 dev_err(&pdev->dev, "request IRQ(%d) failed with ret %d\n",
290 rtc->irq, ret);
291 goto fail_req_irq;
292 }
293 disable_irq(rtc->irq);
294 device_set_wakeup_capable(&pdev->dev, 1);
295 return 0;
296
297fail_req_irq:
298 rtc_device_unregister(rtc->rtc);
299
300fail_rtc_register:
301 tps6586x_update(tps_dev, RTC_CTRL, 0,
302 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
303 return ret;
304};
305
306static int tps6586x_rtc_remove(struct platform_device *pdev)
307{
308 struct tps6586x_rtc *rtc = platform_get_drvdata(pdev);
309 struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
310
311 tps6586x_update(tps_dev, RTC_CTRL, 0,
312 RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
313 rtc_device_unregister(rtc->rtc);
314 free_irq(rtc->irq, rtc);
315 return 0;
316}
317
318#ifdef CONFIG_PM_SLEEP
319static int tps6586x_rtc_suspend(struct device *dev)
320{
321 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
322
323 if (device_may_wakeup(dev))
324 enable_irq_wake(rtc->irq);
325 return 0;
326}
327
328static int tps6586x_rtc_resume(struct device *dev)
329{
330 struct tps6586x_rtc *rtc = dev_get_drvdata(dev);
331
332 if (device_may_wakeup(dev))
333 disable_irq_wake(rtc->irq);
334 return 0;
335}
336#endif
337
338static const struct dev_pm_ops tps6586x_pm_ops = {
339 SET_SYSTEM_SLEEP_PM_OPS(tps6586x_rtc_suspend, tps6586x_rtc_resume)
340};
341
342static struct platform_driver tps6586x_rtc_driver = {
343 .driver = {
344 .name = "tps6586x-rtc",
345 .owner = THIS_MODULE,
346 .pm = &tps6586x_pm_ops,
347 },
348 .probe = tps6586x_rtc_probe,
349 .remove = tps6586x_rtc_remove,
350};
351module_platform_driver(tps6586x_rtc_driver);
352
353MODULE_ALIAS("platform:rtc-tps6586x");
354MODULE_DESCRIPTION("TI TPS6586x RTC driver");
355MODULE_AUTHOR("Laxman dewangan <ldewangan@nvidia.com>");
356MODULE_LICENSE("GPL v2");
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 22eb4ebfa1a6..e5fef141a0e2 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -222,7 +222,7 @@ static const struct rtc_class_ops tps65910_rtc_ops = {
222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, 222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable,
223}; 223};
224 224
225static int __devinit tps65910_rtc_probe(struct platform_device *pdev) 225static int tps65910_rtc_probe(struct platform_device *pdev)
226{ 226{
227 struct tps65910 *tps65910 = NULL; 227 struct tps65910 *tps65910 = NULL;
228 struct tps65910_rtc *tps_rtc = NULL; 228 struct tps65910_rtc *tps_rtc = NULL;
@@ -292,7 +292,7 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
292 * Disable tps65910 RTC interrupts. 292 * Disable tps65910 RTC interrupts.
293 * Sets status flag to free. 293 * Sets status flag to free.
294 */ 294 */
295static int __devexit tps65910_rtc_remove(struct platform_device *pdev) 295static int tps65910_rtc_remove(struct platform_device *pdev)
296{ 296{
297 /* leave rtc running, but disable irqs */ 297 /* leave rtc running, but disable irqs */
298 struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev); 298 struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev);
@@ -342,7 +342,7 @@ static const struct dev_pm_ops tps65910_rtc_pm_ops = {
342 342
343static struct platform_driver tps65910_rtc_driver = { 343static struct platform_driver tps65910_rtc_driver = {
344 .probe = tps65910_rtc_probe, 344 .probe = tps65910_rtc_probe,
345 .remove = __devexit_p(tps65910_rtc_remove), 345 .remove = tps65910_rtc_remove,
346 .driver = { 346 .driver = {
347 .owner = THIS_MODULE, 347 .owner = THIS_MODULE,
348 .name = "tps65910-rtc", 348 .name = "tps65910-rtc",
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 8b7464c8b5cf..ccd4ad370b32 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -458,7 +458,7 @@ static struct rtc_class_ops twl_rtc_ops = {
458 458
459/*----------------------------------------------------------------------*/ 459/*----------------------------------------------------------------------*/
460 460
461static int __devinit twl_rtc_probe(struct platform_device *pdev) 461static int twl_rtc_probe(struct platform_device *pdev)
462{ 462{
463 struct rtc_device *rtc; 463 struct rtc_device *rtc;
464 int ret = -EINVAL; 464 int ret = -EINVAL;
@@ -535,7 +535,7 @@ out1:
535 * Disable all TWL RTC module interrupts. 535 * Disable all TWL RTC module interrupts.
536 * Sets status flag to free. 536 * Sets status flag to free.
537 */ 537 */
538static int __devexit twl_rtc_remove(struct platform_device *pdev) 538static int twl_rtc_remove(struct platform_device *pdev)
539{ 539{
540 /* leave rtc running, but disable irqs */ 540 /* leave rtc running, but disable irqs */
541 struct rtc_device *rtc = platform_get_drvdata(pdev); 541 struct rtc_device *rtc = platform_get_drvdata(pdev);
@@ -597,7 +597,7 @@ MODULE_ALIAS("platform:twl_rtc");
597 597
598static struct platform_driver twl4030rtc_driver = { 598static struct platform_driver twl4030rtc_driver = {
599 .probe = twl_rtc_probe, 599 .probe = twl_rtc_probe,
600 .remove = __devexit_p(twl_rtc_remove), 600 .remove = twl_rtc_remove,
601 .shutdown = twl_rtc_shutdown, 601 .shutdown = twl_rtc_shutdown,
602 .suspend = twl_rtc_suspend, 602 .suspend = twl_rtc_suspend,
603 .resume = twl_rtc_resume, 603 .resume = twl_rtc_resume,
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index 5f60a7c6a155..6c3774cf5a24 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -280,7 +280,7 @@ static const struct rtc_class_ops vr41xx_rtc_ops = {
280 .set_alarm = vr41xx_rtc_set_alarm, 280 .set_alarm = vr41xx_rtc_set_alarm,
281}; 281};
282 282
283static int __devinit rtc_probe(struct platform_device *pdev) 283static int rtc_probe(struct platform_device *pdev)
284{ 284{
285 struct resource *res; 285 struct resource *res;
286 struct rtc_device *rtc; 286 struct rtc_device *rtc;
@@ -373,7 +373,7 @@ err_rtc1_iounmap:
373 return retval; 373 return retval;
374} 374}
375 375
376static int __devexit rtc_remove(struct platform_device *pdev) 376static int rtc_remove(struct platform_device *pdev)
377{ 377{
378 struct rtc_device *rtc; 378 struct rtc_device *rtc;
379 379
@@ -398,7 +398,7 @@ MODULE_ALIAS("platform:RTC");
398 398
399static struct platform_driver rtc_platform_driver = { 399static struct platform_driver rtc_platform_driver = {
400 .probe = rtc_probe, 400 .probe = rtc_probe,
401 .remove = __devexit_p(rtc_remove), 401 .remove = rtc_remove,
402 .driver = { 402 .driver = {
403 .name = rtc_name, 403 .name = rtc_name,
404 .owner = THIS_MODULE, 404 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c
index 14e2d8cfcc83..00c930f4b6f3 100644
--- a/drivers/rtc/rtc-vt8500.c
+++ b/drivers/rtc/rtc-vt8500.c
@@ -70,7 +70,7 @@
70 | ALARM_SEC_BIT) 70 | ALARM_SEC_BIT)
71 71
72#define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */ 72#define VT8500_RTC_CR_ENABLE (1 << 0) /* Enable RTC */
73#define VT8500_RTC_CR_24H (1 << 1) /* 24h time format */ 73#define VT8500_RTC_CR_12H (1 << 1) /* 12h time format */
74#define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */ 74#define VT8500_RTC_CR_SM_ENABLE (1 << 2) /* Enable periodic irqs */
75#define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */ 75#define VT8500_RTC_CR_SM_SEC (1 << 3) /* 0: 1Hz/60, 1: 1Hz */
76#define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */ 76#define VT8500_RTC_CR_CALIB (1 << 4) /* Enable calibration */
@@ -119,7 +119,7 @@ static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm)
119 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); 119 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S);
120 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); 120 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S);
121 tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); 121 tm->tm_mday = bcd2bin(date & DATE_DAY_MASK);
122 tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S); 122 tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S) - 1;
123 tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) 123 tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S)
124 + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100); 124 + ((date >> DATE_CENTURY_S) & 1 ? 200 : 100);
125 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; 125 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S;
@@ -138,8 +138,9 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm)
138 } 138 }
139 139
140 writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S) 140 writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S)
141 | (bin2bcd(tm->tm_mon) << DATE_MONTH_S) 141 | (bin2bcd(tm->tm_mon + 1) << DATE_MONTH_S)
142 | (bin2bcd(tm->tm_mday)), 142 | (bin2bcd(tm->tm_mday))
143 | ((tm->tm_year >= 200) << DATE_CENTURY_S),
143 vt8500_rtc->regbase + VT8500_RTC_DS); 144 vt8500_rtc->regbase + VT8500_RTC_DS);
144 writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) 145 writel((bin2bcd(tm->tm_wday) << TIME_DOW_S)
145 | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) 146 | (bin2bcd(tm->tm_hour) << TIME_HOUR_S)
@@ -205,7 +206,7 @@ static const struct rtc_class_ops vt8500_rtc_ops = {
205 .alarm_irq_enable = vt8500_alarm_irq_enable, 206 .alarm_irq_enable = vt8500_alarm_irq_enable,
206}; 207};
207 208
208static int __devinit vt8500_rtc_probe(struct platform_device *pdev) 209static int vt8500_rtc_probe(struct platform_device *pdev)
209{ 210{
210 struct vt8500_rtc *vt8500_rtc; 211 struct vt8500_rtc *vt8500_rtc;
211 int ret; 212 int ret;
@@ -247,7 +248,7 @@ static int __devinit vt8500_rtc_probe(struct platform_device *pdev)
247 } 248 }
248 249
249 /* Enable RTC and set it to 24-hour mode */ 250 /* Enable RTC and set it to 24-hour mode */
250 writel(VT8500_RTC_CR_ENABLE | VT8500_RTC_CR_24H, 251 writel(VT8500_RTC_CR_ENABLE,
251 vt8500_rtc->regbase + VT8500_RTC_CR); 252 vt8500_rtc->regbase + VT8500_RTC_CR);
252 253
253 vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev, 254 vt8500_rtc->rtc = rtc_device_register("vt8500-rtc", &pdev->dev,
@@ -279,7 +280,7 @@ err_release:
279 return ret; 280 return ret;
280} 281}
281 282
282static int __devexit vt8500_rtc_remove(struct platform_device *pdev) 283static int vt8500_rtc_remove(struct platform_device *pdev)
283{ 284{
284 struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev); 285 struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev);
285 286
@@ -305,7 +306,7 @@ static const struct of_device_id wmt_dt_ids[] = {
305 306
306static struct platform_driver vt8500_rtc_driver = { 307static struct platform_driver vt8500_rtc_driver = {
307 .probe = vt8500_rtc_probe, 308 .probe = vt8500_rtc_probe,
308 .remove = __devexit_p(vt8500_rtc_remove), 309 .remove = vt8500_rtc_remove,
309 .driver = { 310 .driver = {
310 .name = "vt8500-rtc", 311 .name = "vt8500-rtc",
311 .owner = THIS_MODULE, 312 .owner = THIS_MODULE,
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index ea5c6f857ca5..1b0affbe2659 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -459,7 +459,7 @@ err:
459 return ret; 459 return ret;
460} 460}
461 461
462static int __devexit wm831x_rtc_remove(struct platform_device *pdev) 462static int wm831x_rtc_remove(struct platform_device *pdev)
463{ 463{
464 struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); 464 struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev);
465 int alm_irq = platform_get_irq_byname(pdev, "ALM"); 465 int alm_irq = platform_get_irq_byname(pdev, "ALM");
@@ -483,7 +483,7 @@ static const struct dev_pm_ops wm831x_rtc_pm_ops = {
483 483
484static struct platform_driver wm831x_rtc_driver = { 484static struct platform_driver wm831x_rtc_driver = {
485 .probe = wm831x_rtc_probe, 485 .probe = wm831x_rtc_probe,
486 .remove = __devexit_p(wm831x_rtc_remove), 486 .remove = wm831x_rtc_remove,
487 .driver = { 487 .driver = {
488 .name = "wm831x-rtc", 488 .name = "wm831x-rtc",
489 .pm = &wm831x_rtc_pm_ops, 489 .pm = &wm831x_rtc_pm_ops,
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
index c2e52d15abb2..8ad86ae0d30f 100644
--- a/drivers/rtc/rtc-wm8350.c
+++ b/drivers/rtc/rtc-wm8350.c
@@ -459,7 +459,7 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
459 return 0; 459 return 0;
460} 460}
461 461
462static int __devexit wm8350_rtc_remove(struct platform_device *pdev) 462static int wm8350_rtc_remove(struct platform_device *pdev)
463{ 463{
464 struct wm8350 *wm8350 = platform_get_drvdata(pdev); 464 struct wm8350 *wm8350 = platform_get_drvdata(pdev);
465 struct wm8350_rtc *wm_rtc = &wm8350->rtc; 465 struct wm8350_rtc *wm_rtc = &wm8350->rtc;
@@ -479,7 +479,7 @@ static struct dev_pm_ops wm8350_rtc_pm_ops = {
479 479
480static struct platform_driver wm8350_rtc_driver = { 480static struct platform_driver wm8350_rtc_driver = {
481 .probe = wm8350_rtc_probe, 481 .probe = wm8350_rtc_probe,
482 .remove = __devexit_p(wm8350_rtc_remove), 482 .remove = wm8350_rtc_remove,
483 .driver = { 483 .driver = {
484 .name = "wm8350-rtc", 484 .name = "wm8350-rtc",
485 .pm = &wm8350_rtc_pm_ops, 485 .pm = &wm8350_rtc_pm_ops,