aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-cmos.c3
-rw-r--r--drivers/rtc/rtc-mpc5121.c5
-rw-r--r--drivers/rtc/rtc-sa1100.c4
-rw-r--r--drivers/rtc/rtc-snvs.c2
-rw-r--r--drivers/rtc/rtc-stmp3xxx.c3
-rw-r--r--drivers/rtc/rtc-twl.c6
6 files changed, 16 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 16630aa87f45..9deb9e47a67c 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1098,7 +1098,6 @@ static __init void cmos_of_init(struct platform_device *pdev)
1098} 1098}
1099#else 1099#else
1100static inline void cmos_of_init(struct platform_device *pdev) {} 1100static inline void cmos_of_init(struct platform_device *pdev) {}
1101#define of_cmos_match NULL
1102#endif 1101#endif
1103/*----------------------------------------------------------------*/ 1102/*----------------------------------------------------------------*/
1104 1103
@@ -1140,7 +1139,7 @@ static struct platform_driver cmos_platform_driver = {
1140#ifdef CONFIG_PM 1139#ifdef CONFIG_PM
1141 .pm = &cmos_pm_ops, 1140 .pm = &cmos_pm_ops,
1142#endif 1141#endif
1143 .of_match_table = of_cmos_match, 1142 .of_match_table = of_match_ptr(of_cmos_match),
1144 } 1143 }
1145}; 1144};
1146 1145
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
index bec10be96f84..bdcc60830aec 100644
--- a/drivers/rtc/rtc-mpc5121.c
+++ b/drivers/rtc/rtc-mpc5121.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/rtc.h> 15#include <linux/rtc.h>
16#include <linux/of.h>
16#include <linux/of_device.h> 17#include <linux/of_device.h>
17#include <linux/of_platform.h> 18#include <linux/of_platform.h>
18#include <linux/io.h> 19#include <linux/io.h>
@@ -403,17 +404,19 @@ static int mpc5121_rtc_remove(struct platform_device *op)
403 return 0; 404 return 0;
404} 405}
405 406
407#ifdef CONFIG_OF
406static struct of_device_id mpc5121_rtc_match[] = { 408static struct of_device_id mpc5121_rtc_match[] = {
407 { .compatible = "fsl,mpc5121-rtc", }, 409 { .compatible = "fsl,mpc5121-rtc", },
408 { .compatible = "fsl,mpc5200-rtc", }, 410 { .compatible = "fsl,mpc5200-rtc", },
409 {}, 411 {},
410}; 412};
413#endif
411 414
412static struct platform_driver mpc5121_rtc_driver = { 415static struct platform_driver mpc5121_rtc_driver = {
413 .driver = { 416 .driver = {
414 .name = "mpc5121-rtc", 417 .name = "mpc5121-rtc",
415 .owner = THIS_MODULE, 418 .owner = THIS_MODULE,
416 .of_match_table = mpc5121_rtc_match, 419 .of_match_table = of_match_ptr(mpc5121_rtc_match),
417 }, 420 },
418 .probe = mpc5121_rtc_probe, 421 .probe = mpc5121_rtc_probe,
419 .remove = mpc5121_rtc_remove, 422 .remove = mpc5121_rtc_remove,
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 50a5c4adee48..df9180e80e3a 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -349,12 +349,14 @@ static const struct dev_pm_ops sa1100_rtc_pm_ops = {
349}; 349};
350#endif 350#endif
351 351
352#ifdef CONFIG_OF
352static struct of_device_id sa1100_rtc_dt_ids[] = { 353static struct of_device_id sa1100_rtc_dt_ids[] = {
353 { .compatible = "mrvl,sa1100-rtc", }, 354 { .compatible = "mrvl,sa1100-rtc", },
354 { .compatible = "mrvl,mmp-rtc", }, 355 { .compatible = "mrvl,mmp-rtc", },
355 {} 356 {}
356}; 357};
357MODULE_DEVICE_TABLE(of, sa1100_rtc_dt_ids); 358MODULE_DEVICE_TABLE(of, sa1100_rtc_dt_ids);
359#endif
358 360
359static struct platform_driver sa1100_rtc_driver = { 361static struct platform_driver sa1100_rtc_driver = {
360 .probe = sa1100_rtc_probe, 362 .probe = sa1100_rtc_probe,
@@ -364,7 +366,7 @@ static struct platform_driver sa1100_rtc_driver = {
364#ifdef CONFIG_PM 366#ifdef CONFIG_PM
365 .pm = &sa1100_rtc_pm_ops, 367 .pm = &sa1100_rtc_pm_ops,
366#endif 368#endif
367 .of_match_table = sa1100_rtc_dt_ids, 369 .of_match_table = of_match_ptr(sa1100_rtc_dt_ids),
368 }, 370 },
369}; 371};
370 372
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index d5ec7854a651..9b795db3ecce 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -338,7 +338,7 @@ static struct platform_driver snvs_rtc_driver = {
338 .name = "snvs_rtc", 338 .name = "snvs_rtc",
339 .owner = THIS_MODULE, 339 .owner = THIS_MODULE,
340 .pm = &snvs_rtc_pm_ops, 340 .pm = &snvs_rtc_pm_ops,
341 .of_match_table = snvs_dt_ids, 341 .of_match_table = of_match_ptr(snvs_dt_ids),
342 }, 342 },
343 .probe = snvs_rtc_probe, 343 .probe = snvs_rtc_probe,
344 .remove = snvs_rtc_remove, 344 .remove = snvs_rtc_remove,
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
index 739ef55694f4..b2a8ed99b2bf 100644
--- a/drivers/rtc/rtc-stmp3xxx.c
+++ b/drivers/rtc/rtc-stmp3xxx.c
@@ -26,6 +26,7 @@
26#include <linux/rtc.h> 26#include <linux/rtc.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28#include <linux/of_device.h> 28#include <linux/of_device.h>
29#include <linux/of.h>
29 30
30#include <mach/common.h> 31#include <mach/common.h>
31 32
@@ -280,7 +281,7 @@ static struct platform_driver stmp3xxx_rtcdrv = {
280 .driver = { 281 .driver = {
281 .name = "stmp3xxx-rtc", 282 .name = "stmp3xxx-rtc",
282 .owner = THIS_MODULE, 283 .owner = THIS_MODULE,
283 .of_match_table = rtc_dt_ids, 284 .of_match_table = of_match_ptr(rtc_dt_ids),
284 }, 285 },
285}; 286};
286 287
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index ccd4ad370b32..8bc6c80b184c 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -27,6 +27,7 @@
27#include <linux/bcd.h> 27#include <linux/bcd.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/of.h>
30 31
31#include <linux/i2c/twl.h> 32#include <linux/i2c/twl.h>
32 33
@@ -588,11 +589,14 @@ static int twl_rtc_resume(struct platform_device *pdev)
588#define twl_rtc_resume NULL 589#define twl_rtc_resume NULL
589#endif 590#endif
590 591
592#ifdef CONFIG_OF
591static const struct of_device_id twl_rtc_of_match[] = { 593static const struct of_device_id twl_rtc_of_match[] = {
592 {.compatible = "ti,twl4030-rtc", }, 594 {.compatible = "ti,twl4030-rtc", },
593 { }, 595 { },
594}; 596};
595MODULE_DEVICE_TABLE(of, twl_rtc_of_match); 597MODULE_DEVICE_TABLE(of, twl_rtc_of_match);
598#endif
599
596MODULE_ALIAS("platform:twl_rtc"); 600MODULE_ALIAS("platform:twl_rtc");
597 601
598static struct platform_driver twl4030rtc_driver = { 602static struct platform_driver twl4030rtc_driver = {
@@ -604,7 +608,7 @@ static struct platform_driver twl4030rtc_driver = {
604 .driver = { 608 .driver = {
605 .owner = THIS_MODULE, 609 .owner = THIS_MODULE,
606 .name = "twl_rtc", 610 .name = "twl_rtc",
607 .of_match_table = twl_rtc_of_match, 611 .of_match_table = of_match_ptr(twl_rtc_of_match),
608 }, 612 },
609}; 613};
610 614