aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ad7414.c
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2012-01-08 13:34:04 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:26:35 -0400
commitdcb7cb97bafff6c93b65626634f9c066436bf9d2 (patch)
treefe402f2a65d085c6db8b28eedca3f3e3ed394b20 /drivers/hwmon/ad7414.c
parente91aef22cdb9ca12099d6d21f88de5036fe26fb5 (diff)
hwmon: (ad7414) fix checkpatch issues
fixed: WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133: + long temp = simple_strtol(buf, NULL, 10); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/ad7414.c')
-rw-r--r--drivers/hwmon/ad7414.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c
index df29a7fff9e7..edbdb6d9a837 100644
--- a/drivers/hwmon/ad7414.c
+++ b/drivers/hwmon/ad7414.c
@@ -130,7 +130,11 @@ static ssize_t set_max_min(struct device *dev,
130 struct ad7414_data *data = i2c_get_clientdata(client); 130 struct ad7414_data *data = i2c_get_clientdata(client);
131 int index = to_sensor_dev_attr(attr)->index; 131 int index = to_sensor_dev_attr(attr)->index;
132 u8 reg = AD7414_REG_LIMIT[index]; 132 u8 reg = AD7414_REG_LIMIT[index];
133 long temp = simple_strtol(buf, NULL, 10); 133 long temp;
134 int ret = kstrtol(buf, 10, &temp);
135
136 if (ret < 0)
137 return ret;
134 138
135 temp = SENSORS_LIMIT(temp, -40000, 85000); 139 temp = SENSORS_LIMIT(temp, -40000, 85000);
136 temp = (temp + (temp < 0 ? -500 : 500)) / 1000; 140 temp = (temp + (temp < 0 ? -500 : 500)) / 1000;