Skip to content

Commit

Permalink
rtc: rtc-ds1390: use spi_set_drvdata()
Browse files Browse the repository at this point in the history
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jingoo Han authored and torvalds committed Apr 30, 2013
1 parent 3cf7900 commit ccbc20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1390.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int ds1390_probe(struct spi_device *spi)
dev_err(&spi->dev, "unable to allocate device memory\n");
return -ENOMEM;
}
dev_set_drvdata(&spi->dev, chip);
spi_set_drvdata(spi, chip);

res = ds1390_get_reg(&spi->dev, DS1390_REG_SECONDS, &tmp);
if (res != 0) {
Expand Down

0 comments on commit ccbc20f

Please sign in to comment.