Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363075
b: refs/heads/master
c: 8eb6d90
h: refs/heads/master
i:
  363073: fa51987
  363071: 8d30774
v: v3
  • Loading branch information
Guenter Roeck committed Apr 21, 2013
1 parent b4af6fe commit 1317377
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14f2a6654dd42d60645071de26d17d0bced63a7d
refs/heads/master: 8eb6d90fec24244f80bba018d955413ea6117a34
8 changes: 6 additions & 2 deletions trunk/drivers/hwmon/tmp401.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ static ssize_t store_temp_crit_hyst(struct device *dev, struct device_attribute
static ssize_t reset_temp_history(struct device *dev,
struct device_attribute *devattr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct tmp401_data *data = i2c_get_clientdata(client);
long val;

if (kstrtol(buf, 10, &val))
Expand All @@ -362,8 +364,10 @@ static ssize_t reset_temp_history(struct device *dev,
val);
return -EINVAL;
}
i2c_smbus_write_byte_data(to_i2c_client(dev),
TMP401_TEMP_MSB_WRITE[5][0], val);
mutex_lock(&data->update_lock);
i2c_smbus_write_byte_data(client, TMP401_TEMP_MSB_WRITE[5][0], val);
data->valid = 0;
mutex_unlock(&data->update_lock);

return count;
}
Expand Down

0 comments on commit 1317377

Please sign in to comment.