From 527bd754d1ffc4bbd89a33c643e74c53d713eb4e Mon Sep 17 00:00:00 2001 From: Kefeng Wang Date: Tue, 23 Apr 2019 15:50:16 +0800 Subject: rtc: Use dev_get_drvdata() Using dev_get_drvdata directly. Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: linux-rtc@vger.kernel.org Signed-off-by: Kefeng Wang Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-hid-sensor-time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/rtc/rtc-hid-sensor-time.c') diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c index 3e1abb455472..f27c40e8331f 100644 --- a/drivers/rtc/rtc-hid-sensor-time.c +++ b/drivers/rtc/rtc-hid-sensor-time.c @@ -205,8 +205,7 @@ static int hid_time_parse_report(struct platform_device *pdev, static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm) { unsigned long flags; - struct hid_time_state *time_state = - platform_get_drvdata(to_platform_device(dev)); + struct hid_time_state *time_state = dev_get_drvdata(dev); int ret; reinit_completion(&time_state->comp_last_time); -- cgit