]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
rtc: ds1685: simplify getting .driver_data
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sun, 21 Oct 2018 20:00:41 +0000 (22:00 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 22 Oct 2018 15:53:12 +0000 (17:53 +0200)
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 <wsa+renesas@sang-engineering.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1685.c

index b0723025ac31ec6ca81249b37cbc342b5747a151..2710f2594c42a7bce1ee0aa3fb53b7c9a8fb5b2e 100644 (file)
@@ -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;