diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 16:06:14 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-05-03 22:08:00 +0200 |
commit | 85368bb9de6366654f442e26fdd571981f205291 (patch) | |
tree | 807385ec3a590efc12b24fe22b3ee7f8fd204e0f /drivers/rtc/rtc-mv.c | |
parent | 36d91a4d401c284ab21213622c85cd855725f10f (diff) |
rtc: simplify getting .drvdata
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Michal Simek <michal.simek@xilinx.com> (for zynqmp)
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-mv.c')
-rw-r--r-- | drivers/rtc/rtc-mv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index bc52dbb0c0e2..4b198b3778d3 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@ -176,8 +176,7 @@ static int mv_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) static int mv_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) { - struct platform_device *pdev = to_platform_device(dev); - struct rtc_plat_data *pdata = platform_get_drvdata(pdev); + struct rtc_plat_data *pdata = dev_get_drvdata(dev); void __iomem *ioaddr = pdata->ioaddr; if (pdata->irq < 0) |