diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 09:45:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 09:45:48 -0700 |
commit | 92ddcf4a011a95dac98d3bbb0211a2fa42f13dc1 (patch) | |
tree | ac937fd7cc4d53542c5c299c85df09b1b87bf1c8 /drivers/hwmon/s3c-hwmon.c | |
parent | 000a74f41e601bc4e36a760aa42f219a019c5391 (diff) | |
parent | 6445e6600fa632448cac64e71119310378464ad9 (diff) |
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon update from Guenter Roeck:
- New drivers for NCT6775, NCT6776, NCT6779, and LM95234.
- Added support for LTC2974, LTC3883, LM25056, TMP431, TMP432, ADT7310,
and ADT7320 to existing drivers.
- Various code cleanups and minor improvements.
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (54 commits)
hwmon: (nct6775) Fix coding style problems
hwmon: (nct6775) Constify strings
hwmon: (tmp401) Add support for TMP432
hwmon: (tmp401) Add support for update_interval attribute
hwmon: (tmp401) Reset valid flag when resetting temperature history
hwmon: (tmp401) Simplification and cleanup
hwmon: (tmp401) Use sysfs_create_group / sysfs_remove_group
hwmon: (tmp401) Drop unused defines, use BIT for bit masks
hwmon: (nct6775) Use ARRAY_SIZE for loops where possible
documentation: hwmon: Fix typo in documentation/hwmon
hwmon: (nct6775) Enable both AUXTIN and VIN3 on NCT6776
hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata()
MAINTAINERS: Add myself as maintainer for the NCT6775 driver
hwmon: (nct6775) Expand scope of supported chips
hwmon: (gpio-fan) Use is_visible to determine if attributes should be created
hwmon: (tmp401) Fix device detection for TMP411B and TMP411C
hwmon: Add driver for LM95234
hwmon: (tmp401) Add support for TMP431
hwmon: (pmbus/lm25066) Add support for LM25056
hwmon: (pmbus/lm25066) Refactor device specific coefficients
...
Diffstat (limited to 'drivers/hwmon/s3c-hwmon.c')
-rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index ff2ae0252a4..a9f7e804f1e 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c @@ -107,17 +107,14 @@ static ssize_t s3c_hwmon_show_raw(struct device *dev, return (ret < 0) ? ret : snprintf(buf, PAGE_SIZE, "%d\n", ret); } -#define DEF_ADC_ATTR(x) \ - static SENSOR_DEVICE_ATTR(adc##x##_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, x) - -DEF_ADC_ATTR(0); -DEF_ADC_ATTR(1); -DEF_ADC_ATTR(2); -DEF_ADC_ATTR(3); -DEF_ADC_ATTR(4); -DEF_ADC_ATTR(5); -DEF_ADC_ATTR(6); -DEF_ADC_ATTR(7); +static SENSOR_DEVICE_ATTR(adc0_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 0); +static SENSOR_DEVICE_ATTR(adc1_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 1); +static SENSOR_DEVICE_ATTR(adc2_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 2); +static SENSOR_DEVICE_ATTR(adc3_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 3); +static SENSOR_DEVICE_ATTR(adc4_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 4); +static SENSOR_DEVICE_ATTR(adc5_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 5); +static SENSOR_DEVICE_ATTR(adc6_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 6); +static SENSOR_DEVICE_ATTR(adc7_raw, S_IRUGO, s3c_hwmon_show_raw, NULL, 7); static struct attribute *s3c_hwmon_attrs[9] = { &sensor_dev_attr_adc0_raw.dev_attr.attr, |