Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292110
b: refs/heads/master
c: dcb7cb9
h: refs/heads/master
v: v3
  • Loading branch information
Frans Meulenbroeks authored and Guenter Roeck committed Mar 19, 2012
1 parent 9fd46d6 commit bdd8852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: e91aef22cdb9ca12099d6d21f88de5036fe26fb5
refs/heads/master: dcb7cb97bafff6c93b65626634f9c066436bf9d2
6 changes: 5 additions & 1 deletion trunk/drivers/hwmon/ad7414.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ static ssize_t set_max_min(struct device *dev,
struct ad7414_data *data = i2c_get_clientdata(client);
int index = to_sensor_dev_attr(attr)->index;
u8 reg = AD7414_REG_LIMIT[index];
long temp = simple_strtol(buf, NULL, 10);
long temp;
int ret = kstrtol(buf, 10, &temp);

if (ret < 0)
return ret;

temp = SENSORS_LIMIT(temp, -40000, 85000);
temp = (temp + (temp < 0 ? -500 : 500)) / 1000;
Expand Down

0 comments on commit bdd8852

Please sign in to comment.