diff options
author | Nicolae Rosia <Nicolae_Rosia@mentor.com> | 2016-11-23 10:55:57 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-11-30 21:21:33 +0100 |
commit | 1c02cbfec5c7754cb16456fcb26592a20781cdff (patch) | |
tree | b06ed0ba1ccb485d05a8ff760cb6295e90624476 /drivers/rtc/rtc-twl.c | |
parent | e3e7f95bca95c7d0172e6481066668a176dc4696 (diff) | |
download | lwn-1c02cbfec5c7754cb16456fcb26592a20781cdff.tar.gz lwn-1c02cbfec5c7754cb16456fcb26592a20781cdff.zip |
rtc: twl: make driver DT only
Since there are no platform based users and all users
of this code are TI OMAP-based which is DT only, it makes
sense to remove unused code.
Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-twl.c')
-rw-r--r-- | drivers/rtc/rtc-twl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 1e415268770e..c18c39212ce6 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -496,10 +496,16 @@ static const struct rtc_class_ops twl_rtc_ops = { static int twl_rtc_probe(struct platform_device *pdev) { struct twl_rtc *twl_rtc; + struct device_node *np = pdev->dev.of_node; int ret = -EINVAL; int irq = platform_get_irq(pdev, 0); u8 rd_reg; + if (!np) { + dev_err(&pdev->dev, "no DT info\n"); + return -EINVAL; + } + if (irq <= 0) return ret; @@ -632,15 +638,11 @@ static int twl_rtc_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(twl_rtc_pm_ops, twl_rtc_suspend, twl_rtc_resume); -#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 = { .probe = twl_rtc_probe, @@ -649,7 +651,7 @@ static struct platform_driver twl4030rtc_driver = { .driver = { .name = "twl_rtc", .pm = &twl_rtc_pm_ops, - .of_match_table = of_match_ptr(twl_rtc_of_match), + .of_match_table = twl_rtc_of_match, }, }; |