浏览代码

hwmon: fscher control update bugfix

Here is another small fscher bugfix for 2.6.23 merging, this was caught by Jean
while reviewing my other bugfix. The driver was updating its copy of the
control register as if it was clear to write, but its regular read/write.  This
patch fixes this.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Hans de Goede 18 年之前
父节点
当前提交
794f543494
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/hwmon/fscher.c

+ 1 - 1
drivers/hwmon/fscher.c

@@ -599,7 +599,7 @@ static ssize_t set_control(struct i2c_client *client, struct fscher_data *data,
 	unsigned long v = simple_strtoul(buf, NULL, 10) & 0x01;
 	unsigned long v = simple_strtoul(buf, NULL, 10) & 0x01;
 
 
 	mutex_lock(&data->update_lock);
 	mutex_lock(&data->update_lock);
-	data->global_control &= ~v;
+	data->global_control = v;
 	fscher_write_value(client, reg, v);
 	fscher_write_value(client, reg, v);
 	mutex_unlock(&data->update_lock);
 	mutex_unlock(&data->update_lock);
 	return count;
 	return count;