summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-mpc5121.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-02-22 01:44:28 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-22 02:22:27 +0100
commitc8a6046e1e0bb03406e4fc6c0a204ef58a1868e4 (patch)
treec041260ad34e5b5924c6bc5b09e9042e6df77574 /drivers/rtc/rtc-mpc5121.c
parentrtc-pcf8523: add low battery voltage support (diff)
downloadlinux-c8a6046e1e0bb03406e4fc6c0a204ef58a1868e4.tar.xz
linux-c8a6046e1e0bb03406e4fc6c0a204ef58a1868e4.zip
drivers/rtc: use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Maintains consistency in cases where OF is always selected. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-mpc5121.c')
-rw-r--r--drivers/rtc/rtc-mpc5121.c5
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 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/rtc.h>
+#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/io.h>
@@ -403,17 +404,19 @@ static int mpc5121_rtc_remove(struct platform_device *op)
return 0;
}
+#ifdef CONFIG_OF
static struct of_device_id mpc5121_rtc_match[] = {
{ .compatible = "fsl,mpc5121-rtc", },
{ .compatible = "fsl,mpc5200-rtc", },
{},
};
+#endif
static struct platform_driver mpc5121_rtc_driver = {
.driver = {
.name = "mpc5121-rtc",
.owner = THIS_MODULE,
- .of_match_table = mpc5121_rtc_match,
+ .of_match_table = of_match_ptr(mpc5121_rtc_match),
},
.probe = mpc5121_rtc_probe,
.remove = mpc5121_rtc_remove,