diff options
Diffstat (limited to 'drivers/hwmon/fscher.c')
-rw-r--r-- | drivers/hwmon/fscher.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hwmon/fscher.c b/drivers/hwmon/fscher.c index 19717752cfca..b34b546c68b8 100644 --- a/drivers/hwmon/fscher.c +++ b/drivers/hwmon/fscher.c | |||
@@ -441,6 +441,8 @@ static struct fscher_data *fscher_update_device(struct device *dev) | |||
441 | data->watchdog[2] = fscher_read_value(client, FSCHER_REG_WDOG_CONTROL); | 441 | data->watchdog[2] = fscher_read_value(client, FSCHER_REG_WDOG_CONTROL); |
442 | 442 | ||
443 | data->global_event = fscher_read_value(client, FSCHER_REG_EVENT_STATE); | 443 | data->global_event = fscher_read_value(client, FSCHER_REG_EVENT_STATE); |
444 | data->global_control = fscher_read_value(client, | ||
445 | FSCHER_REG_CONTROL); | ||
444 | 446 | ||
445 | data->last_updated = jiffies; | 447 | data->last_updated = jiffies; |
446 | data->valid = 1; | 448 | data->valid = 1; |
@@ -599,7 +601,7 @@ static ssize_t set_control(struct i2c_client *client, struct fscher_data *data, | |||
599 | unsigned long v = simple_strtoul(buf, NULL, 10) & 0x01; | 601 | unsigned long v = simple_strtoul(buf, NULL, 10) & 0x01; |
600 | 602 | ||
601 | mutex_lock(&data->update_lock); | 603 | mutex_lock(&data->update_lock); |
602 | data->global_control &= ~v; | 604 | data->global_control = v; |
603 | fscher_write_value(client, reg, v); | 605 | fscher_write_value(client, reg, v); |
604 | mutex_unlock(&data->update_lock); | 606 | mutex_unlock(&data->update_lock); |
605 | return count; | 607 | return count; |