diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 17:37:49 +0200 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 17:54:19 +0200 |
commit | c032862fba51a3ca504752d3a25186b324c5ce83 (patch) | |
tree | 955dc2ba4ab3df76ecc2bb780ee84aca04967e8d /drivers/hwmon/ltc4261.c | |
parent | fda76e074c7737fc57855dd17c762e50ed526052 (diff) | |
parent | 8700c95adb033843fc163d112b9d21d4fda78018 (diff) |
Merge commit '8700c95adb03' into timers/nohz
The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.
Merge a common upstream merge point that has these
updates.
Conflicts:
include/linux/perf_event.h
kernel/rcutree.h
kernel/rcutree_plugin.h
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/hwmon/ltc4261.c')
-rw-r--r-- | drivers/hwmon/ltc4261.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/drivers/hwmon/ltc4261.c b/drivers/hwmon/ltc4261.c index 84a2d2872b2..487da58ec86 100644 --- a/drivers/hwmon/ltc4261.c +++ b/drivers/hwmon/ltc4261.c @@ -165,24 +165,12 @@ static ssize_t ltc4261_show_bool(struct device *dev, } /* - * These macros are used below in constructing device attribute objects - * for use with sysfs_create_group() to make a sysfs device file - * for each register. - */ - -#define LTC4261_VALUE(name, ltc4261_cmd_idx) \ - static SENSOR_DEVICE_ATTR(name, S_IRUGO, \ - ltc4261_show_value, NULL, ltc4261_cmd_idx) - -#define LTC4261_BOOL(name, mask) \ - static SENSOR_DEVICE_ATTR(name, S_IRUGO, \ - ltc4261_show_bool, NULL, (mask)) - -/* * Input voltages. */ -LTC4261_VALUE(in1_input, LTC4261_ADIN_H); -LTC4261_VALUE(in2_input, LTC4261_ADIN2_H); +static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, ltc4261_show_value, NULL, + LTC4261_ADIN_H); +static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, ltc4261_show_value, NULL, + LTC4261_ADIN2_H); /* * Voltage alarms. The chip has only one set of voltage alarm status bits, @@ -192,16 +180,22 @@ LTC4261_VALUE(in2_input, LTC4261_ADIN2_H); * To ensure that the alarm condition is reported to the user, report it * with both voltage sensors. */ -LTC4261_BOOL(in1_min_alarm, FAULT_UV); -LTC4261_BOOL(in1_max_alarm, FAULT_OV); -LTC4261_BOOL(in2_min_alarm, FAULT_UV); -LTC4261_BOOL(in2_max_alarm, FAULT_OV); +static SENSOR_DEVICE_ATTR(in1_min_alarm, S_IRUGO, ltc4261_show_bool, NULL, + FAULT_UV); +static SENSOR_DEVICE_ATTR(in1_max_alarm, S_IRUGO, ltc4261_show_bool, NULL, + FAULT_OV); +static SENSOR_DEVICE_ATTR(in2_min_alarm, S_IRUGO, ltc4261_show_bool, NULL, + FAULT_UV); +static SENSOR_DEVICE_ATTR(in2_max_alarm, S_IRUGO, ltc4261_show_bool, NULL, + FAULT_OV); /* Currents (via sense resistor) */ -LTC4261_VALUE(curr1_input, LTC4261_SENSE_H); +static SENSOR_DEVICE_ATTR(curr1_input, S_IRUGO, ltc4261_show_value, NULL, + LTC4261_SENSE_H); /* Overcurrent alarm */ -LTC4261_BOOL(curr1_max_alarm, FAULT_OC); +static SENSOR_DEVICE_ATTR(curr1_max_alarm, S_IRUGO, ltc4261_show_bool, NULL, + FAULT_OC); static struct attribute *ltc4261_attributes[] = { &sensor_dev_attr_in1_input.dev_attr.attr, |