summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-hid-sensor-time.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2019-04-23 09:50:16 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-29 15:53:43 +0200
commit527bd754d1ffc4bbd89a33c643e74c53d713eb4e (patch)
treef2adaae984ff1e29070cb40a8804ea387df3fd7e /drivers/rtc/rtc-hid-sensor-time.c
parentrtc: imxdi: convert to SPDX identifier (diff)
downloadlinux-527bd754d1ffc4bbd89a33c643e74c53d713eb4e.tar.xz
linux-527bd754d1ffc4bbd89a33c643e74c53d713eb4e.zip
rtc: Use dev_get_drvdata()
Using dev_get_drvdata directly. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: linux-rtc@vger.kernel.org Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
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);