From 85368bb9de6366654f442e26fdd571981f205291 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Thu, 19 Apr 2018 16:06:14 +0200 Subject: 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 Acked-by: Michal Simek (for zynqmp) Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/rtc/rtc-test.c') 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) -- cgit v1.2.3