From: Wolfram Sang Date: Sun, 21 Oct 2018 20:00:41 +0000 (+0200) Subject: rtc: ds1685: simplify getting .driver_data X-Git-Tag: v5.15~7716^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f5b390b3abe690ac3875a226e96a1528647f948;p=platform%2Fkernel%2Flinux-starfive.git rtc: ds1685: simplify getting .driver_data We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c index b072302..2710f25 100644 --- a/drivers/rtc/rtc-ds1685.c +++ b/drivers/rtc/rtc-ds1685.c @@ -778,8 +778,7 @@ static const char *ds1685_rtc_sqw_freq[16] = { static int ds1685_rtc_proc(struct device *dev, struct seq_file *seq) { - struct platform_device *pdev = to_platform_device(dev); - struct ds1685_priv *rtc = platform_get_drvdata(pdev); + struct ds1685_priv *rtc = dev_get_drvdata(dev); u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8]; char *model;