summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-test.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-19 17:06:14 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-03 23:08:00 +0300
commit85368bb9de6366654f442e26fdd571981f205291 (patch)
tree807385ec3a590efc12b24fe22b3ee7f8fd204e0f /drivers/rtc/rtc-test.c
parent36d91a4d401c284ab21213622c85cd855725f10f (diff)
downloadlinux-85368bb9de6366654f442e26fdd571981f205291.tar.xz
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-test.c')
-rw-r--r--drivers/rtc/rtc-test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 3a2da4c892d6..390f928fd6fc 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -84,8 +84,7 @@ static ssize_t test_irq_store(struct device *dev,
const char *buf, size_t count)
{
int retval;
- struct platform_device *plat_dev = to_platform_device(dev);
- struct rtc_device *rtc = platform_get_drvdata(plat_dev);
+ struct rtc_device *rtc = dev_get_drvdata(dev);
retval = count;
if (strncmp(buf, "tick", 4) == 0 && rtc->pie_enabled)