aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83l786ng.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-06-24 21:02:32 -0400
committerGuenter Roeck <linux@roeck-us.net>2014-06-25 09:59:39 -0400
commita8d4d82e50f2b3ea5ba03cd97385916009dda7a3 (patch)
treeb2b282a23c7612b5a9a3a1bf01e50d50f1b8c45d /drivers/hwmon/w83l786ng.c
parenta497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff)
hwmon: (w83l786ng) Report correct minimum fan speed
Current code is buggy, it shows the current fan speed as minimum fan speed. Fix up show_fan_reg macro to correctly report fan and fan_min speed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Kevin Lo <kevlo@kevlo.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/w83l786ng.c')
-rw-r--r--drivers/hwmon/w83l786ng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/w83l786ng.c b/drivers/hwmon/w83l786ng.c
index 6ed76ceb9270..32487c19cbfc 100644
--- a/drivers/hwmon/w83l786ng.c
+++ b/drivers/hwmon/w83l786ng.c
@@ -249,7 +249,7 @@ static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \
249 int nr = to_sensor_dev_attr(attr)->index; \ 249 int nr = to_sensor_dev_attr(attr)->index; \
250 struct w83l786ng_data *data = w83l786ng_update_device(dev); \ 250 struct w83l786ng_data *data = w83l786ng_update_device(dev); \
251 return sprintf(buf, "%d\n", \ 251 return sprintf(buf, "%d\n", \
252 FAN_FROM_REG(data->fan[nr], DIV_FROM_REG(data->fan_div[nr]))); \ 252 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
253} 253}
254 254
255show_fan_reg(fan); 255show_fan_reg(fan);