Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222135
b: refs/heads/master
c: 61ec2da
h: refs/heads/master
i:
  222133: 8c0a826
  222131: c8e24a1
  222127: ae795af
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Nov 15, 2010
1 parent 4fdaadd commit c373778
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: 2aa25c22c445df63b5961883f28767643122f935
refs/heads/master: 61ec2da506ec6544873f0aba026164e4bdd21751
19 changes: 14 additions & 5 deletions trunk/drivers/hwmon/lm95241.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ static ssize_t set_interval(struct device *dev, struct device_attribute *attr,
{
struct i2c_client *client = to_i2c_client(dev);
struct lm95241_data *data = i2c_get_clientdata(client);
unsigned long val;

strict_strtol(buf, 10, &data->interval);
data->interval = data->interval * HZ / 1000;
if (strict_strtoul(buf, 10, &val) < 0)
return -EINVAL;

data->interval = val * HZ / 1000;

return count;
}
Expand Down Expand Up @@ -188,7 +191,9 @@ static ssize_t set_type##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \
\
long val; \
strict_strtol(buf, 10, &val); \
\
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL; \
\
if ((val == 1) || (val == 2)) { \
\
Expand Down Expand Up @@ -227,7 +232,9 @@ static ssize_t set_min##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \
\
long val; \
strict_strtol(buf, 10, &val); \
\
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL;\
\
mutex_lock(&data->update_lock); \
\
Expand Down Expand Up @@ -256,7 +263,9 @@ static ssize_t set_max##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \
\
long val; \
strict_strtol(buf, 10, &val); \
\
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL; \
\
mutex_lock(&data->update_lock); \
\
Expand Down

0 comments on commit c373778

Please sign in to comment.