diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 16:52:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 16:52:50 -0700 |
commit | 0c63e38a129e7b1f625c6112439a4efc87b1635c (patch) | |
tree | bde880587c6a1da9eee2d44d3036b56e0d557f07 /drivers/hwmon/adcxx.c | |
parent | 0798b1dbfbd9ff2a370c5968c5f0621ef0075fe0 (diff) | |
parent | b0b349a85d3df00a40a8bd398e4a151fd8e91bbe (diff) |
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: New driver for the SMSC EMC6W201
hwmon: (abituguru) Depend on DMI
hwmon: (it87) Use request_muxed_region
hwmon: (sch5627) Trigger Vbat measurements
hwmon: (sch5627) Add sch5627_send_cmd function
i8k: Integrate with the hwmon subsystem
hwmon: (max6650) Properly support the MAX6650
hwmon: (max6650) Drop device detection
Move ACPI power meter driver to hwmon
hwmon: (f71882fg) Add support for F71808A
hwmon: (f71882fg) Split has_beep in fan_has_beep and temp_has_beep
hwmon: (asc7621) Drop duplicate dependency
hwmon: (jc42) Change detection class
hwmon: Add driver for AMD family 15h processor power information
hwmon: (k10temp) Add support for Fam15h (Bulldozer)
hwmon: Use helper functions to set and get driver data
i8k: Avoid lahf in 64-bit code
Diffstat (limited to 'drivers/hwmon/adcxx.c')
-rw-r--r-- | drivers/hwmon/adcxx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c index fbdc7655303..b2cacbe707a 100644 --- a/drivers/hwmon/adcxx.c +++ b/drivers/hwmon/adcxx.c @@ -62,7 +62,7 @@ static ssize_t adcxx_read(struct device *dev, { struct spi_device *spi = to_spi_device(dev); struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); - struct adcxx *adc = dev_get_drvdata(&spi->dev); + struct adcxx *adc = spi_get_drvdata(spi); u8 tx_buf[2]; u8 rx_buf[2]; int status; @@ -105,7 +105,7 @@ static ssize_t adcxx_show_max(struct device *dev, struct device_attribute *devattr, char *buf) { struct spi_device *spi = to_spi_device(dev); - struct adcxx *adc = dev_get_drvdata(&spi->dev); + struct adcxx *adc = spi_get_drvdata(spi); u32 reference; if (mutex_lock_interruptible(&adc->lock)) @@ -122,7 +122,7 @@ static ssize_t adcxx_set_max(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct spi_device *spi = to_spi_device(dev); - struct adcxx *adc = dev_get_drvdata(&spi->dev); + struct adcxx *adc = spi_get_drvdata(spi); unsigned long value; if (strict_strtoul(buf, 10, &value)) @@ -142,7 +142,7 @@ static ssize_t adcxx_show_name(struct device *dev, struct device_attribute *devattr, char *buf) { struct spi_device *spi = to_spi_device(dev); - struct adcxx *adc = dev_get_drvdata(&spi->dev); + struct adcxx *adc = spi_get_drvdata(spi); return sprintf(buf, "adcxx%ds\n", adc->channels); } @@ -182,7 +182,7 @@ static int __devinit adcxx_probe(struct spi_device *spi) mutex_lock(&adc->lock); - dev_set_drvdata(&spi->dev, adc); + spi_set_drvdata(spi, adc); for (i = 0; i < 3 + adc->channels; i++) { status = device_create_file(&spi->dev, &ad_input[i].dev_attr); @@ -206,7 +206,7 @@ out_err: for (i--; i >= 0; i--) device_remove_file(&spi->dev, &ad_input[i].dev_attr); - dev_set_drvdata(&spi->dev, NULL); + spi_set_drvdata(spi, NULL); mutex_unlock(&adc->lock); kfree(adc); return status; @@ -214,7 +214,7 @@ out_err: static int __devexit adcxx_remove(struct spi_device *spi) { - struct adcxx *adc = dev_get_drvdata(&spi->dev); + struct adcxx *adc = spi_get_drvdata(spi); int i; mutex_lock(&adc->lock); @@ -222,7 +222,7 @@ static int __devexit adcxx_remove(struct spi_device *spi) for (i = 0; i < 3 + adc->channels; i++) device_remove_file(&spi->dev, &ad_input[i].dev_attr); - dev_set_drvdata(&spi->dev, NULL); + spi_set_drvdata(spi, NULL); mutex_unlock(&adc->lock); kfree(adc); |