Commit 6f5b390b authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent c3e04915
...@@ -778,8 +778,7 @@ static const char *ds1685_rtc_sqw_freq[16] = { ...@@ -778,8 +778,7 @@ static const char *ds1685_rtc_sqw_freq[16] = {
static int static int
ds1685_rtc_proc(struct device *dev, struct seq_file *seq) ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
{ {
struct platform_device *pdev = to_platform_device(dev); struct ds1685_priv *rtc = dev_get_drvdata(dev);
struct ds1685_priv *rtc = platform_get_drvdata(pdev);
u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8]; u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
char *model; char *model;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment