diff options
Diffstat (limited to 'drivers/rtc/rtc-mpc5121.c')
-rw-r--r-- | drivers/rtc/rtc-mpc5121.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 | ||
406 | static struct of_device_id mpc5121_rtc_match[] = { | 408 | static 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 | ||
412 | static struct platform_driver mpc5121_rtc_driver = { | 415 | static 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, |