diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-04 21:51:29 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 00:16:42 -0400 |
commit | debe597cca61aacf9e17a4dc155aa84446ab4bf0 (patch) | |
tree | 51ba9a0127629aba1741a1f6684a1c77385725ca /drivers/hwmon | |
parent | 4aa3eb4cbe0e6f307f7b4d37a8475bace51b773b (diff) |
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 <jg1.han@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/ad7314.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
116 | if (chip == NULL) | 116 | if (chip == NULL) |
117 | return -ENOMEM; | 117 | return -ENOMEM; |
118 | 118 | ||
119 | dev_set_drvdata(&spi_dev->dev, chip); | 119 | spi_set_drvdata(spi_dev, chip); |
120 | 120 | ||
121 | ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); | 121 | ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); |
122 | if (ret < 0) | 122 | if (ret < 0) |
@@ -137,7 +137,7 @@ error_remove_group: | |||
137 | 137 | ||
138 | static int ad7314_remove(struct spi_device *spi_dev) | 138 | static int ad7314_remove(struct spi_device *spi_dev) |
139 | { | 139 | { |
140 | struct ad7314_data *chip = dev_get_drvdata(&spi_dev->dev); | 140 | struct ad7314_data *chip = spi_get_drvdata(spi_dev); |
141 | 141 | ||
142 | hwmon_device_unregister(chip->hwmon_dev); | 142 | hwmon_device_unregister(chip->hwmon_dev); |
143 | sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); | 143 | sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); |