]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-twl: use of_match_ptr() macro
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 20 Feb 2013 02:15:42 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:24 +0000 (16:53 +1100)
Used of_match_ptr() macro with CONFIG_OF defined.
This maintains code consistency with the rest of the drivers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-twl.c

index ccd4ad370b32fc2a2685c4103ed9902f137ee50b..8bc6c80b184c42c763b874c1c9c344bd0e3c542f 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/bcd.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/of.h>
 
 #include <linux/i2c/twl.h>
 
@@ -588,11 +589,14 @@ static int twl_rtc_resume(struct platform_device *pdev)
 #define twl_rtc_resume  NULL
 #endif
 
+#ifdef CONFIG_OF
 static const struct of_device_id twl_rtc_of_match[] = {
        {.compatible = "ti,twl4030-rtc", },
        { },
 };
 MODULE_DEVICE_TABLE(of, twl_rtc_of_match);
+#endif
+
 MODULE_ALIAS("platform:twl_rtc");
 
 static struct platform_driver twl4030rtc_driver = {
@@ -604,7 +608,7 @@ static struct platform_driver twl4030rtc_driver = {
        .driver         = {
                .owner          = THIS_MODULE,
                .name           = "twl_rtc",
-               .of_match_table = twl_rtc_of_match,
+               .of_match_table = of_match_ptr(twl_rtc_of_match),
        },
 };