From dcb7cb97bafff6c93b65626634f9c066436bf9d2 Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Sun, 8 Jan 2012 19:34:04 +0100 Subject: [PATCH] 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 Signed-off-by: Guenter Roeck --- drivers/hwmon/ad7414.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, 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;