From debe597cca61aacf9e17a4dc155aa84446ab4bf0 Mon Sep 17 00:00:00 2001 From: Jingoo Han Date: Fri, 5 Apr 2013 10:51:29 +0900 Subject: hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata() 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 Signed-off-by: Guenter Roeck --- drivers/hwmon/ad7314.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/hwmon') diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c index f3c60019a536..f4f9b219bf16 100644 --- a/drivers/hwmon/ad7314.c +++ b/drivers/hwmon/ad7314.c @@ -116,7 +116,7 @@ static int ad7314_probe(struct spi_device *spi_dev) if (chip == NULL) return -ENOMEM; - dev_set_drvdata(&spi_dev->dev, chip); + spi_set_drvdata(spi_dev, chip); ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); if (ret < 0) @@ -137,7 +137,7 @@ error_remove_group: static int ad7314_remove(struct spi_device *spi_dev) { - struct ad7314_data *chip = dev_get_drvdata(&spi_dev->dev); + struct ad7314_data *chip = spi_get_drvdata(spi_dev); hwmon_device_unregister(chip->hwmon_dev); sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); -- cgit v1.2.3-59-g8ed1b