aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-hid-sensor-time.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-hid-sensor-time.c')
-rw-r--r--drivers/rtc/rtc-hid-sensor-time.c3
1 files changed, 1 insertions, 2 deletions
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);