aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-mpc5121.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-mpc5121.c')
-rw-r--r--drivers/rtc/rtc-mpc5121.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
index 029e421baaed..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>
@@ -306,7 +307,7 @@ static const struct rtc_class_ops mpc5200_rtc_ops = {
306 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable, 307 .alarm_irq_enable = mpc5121_rtc_alarm_irq_enable,
307}; 308};
308 309
309static int __devinit mpc5121_rtc_probe(struct platform_device *op) 310static int mpc5121_rtc_probe(struct platform_device *op)
310{ 311{
311 struct mpc5121_rtc_data *rtc; 312 struct mpc5121_rtc_data *rtc;
312 int err = 0; 313 int err = 0;
@@ -382,7 +383,7 @@ out_free:
382 return err; 383 return err;
383} 384}
384 385
385static int __devexit mpc5121_rtc_remove(struct platform_device *op) 386static int mpc5121_rtc_remove(struct platform_device *op)
386{ 387{
387 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); 388 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
388 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; 389 struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
@@ -403,20 +404,22 @@ static int __devexit mpc5121_rtc_remove(struct platform_device *op)
403 return 0; 404 return 0;
404} 405}
405 406
406static struct of_device_id mpc5121_rtc_match[] __devinitdata = { 407#ifdef CONFIG_OF
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 = __devexit_p(mpc5121_rtc_remove), 422 .remove = mpc5121_rtc_remove,
420}; 423};
421 424
422module_platform_driver(mpc5121_rtc_driver); 425module_platform_driver(mpc5121_rtc_driver);