From patchwork Thu Jan 17 06:23:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] drivers/rtc/rtc-twl: use of_match_ptr() macro From: Sachin Kamat X-Patchwork-Id: 213146 Message-Id: <1358403788-20384-1-git-send-email-sachin.kamat@linaro.org> To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, patches@linaro.org Date: Thu, 17 Jan 2013 11:53:08 +0530 Used of_match_ptr() macro with CONFIG_OF defined. This maintains code consistency with the rest of the drivers. Signed-off-by: Sachin Kamat --- Compile tested on linux-next (20130117). This driver was left out from "drivers/rtc: use of_match_ptr() macro" patch as its dependencies gave compilation errors then. --- drivers/rtc/rtc-twl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index ccd4ad3..8bc6c80 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -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), }, };