Skip to content

Commit

Permalink
rtc: ds1685: simplify getting .driver_data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang authored and Alexandre Belloni committed Oct 22, 2018
1 parent c3e0491 commit 6f5b390
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/rtc/rtc-ds1685.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6f5b390

Please sign in to comment.