diff options
author | Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com> | 2014-04-01 11:04:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 19:26:24 -0400 |
commit | 403007457dce735ca4fa27a1df4c9af305e53652 (patch) | |
tree | cbcccda47b2325972473e931c02cfc5ca0553640 | |
parent | 32d9dbe37965cb2e7fce47ea836a57cab4ffe5d4 (diff) |
misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()
simple_strtoull() is obsolete, use the newer kstrtoull() instead.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/ds1682.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c index 6a672f9ef522..b909fb30232a 100644 --- a/drivers/misc/ds1682.c +++ b/drivers/misc/ds1682.c | |||
@@ -85,7 +85,6 @@ static ssize_t ds1682_store(struct device *dev, struct device_attribute *attr, | |||
85 | { | 85 | { |
86 | struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); | 86 | struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); |
87 | struct i2c_client *client = to_i2c_client(dev); | 87 | struct i2c_client *client = to_i2c_client(dev); |
88 | char *endp; | ||
89 | u64 val; | 88 | u64 val; |
90 | __le32 val_le; | 89 | __le32 val_le; |
91 | int rc; | 90 | int rc; |
@@ -93,8 +92,8 @@ static ssize_t ds1682_store(struct device *dev, struct device_attribute *attr, | |||
93 | dev_dbg(dev, "ds1682_store() called on %s\n", attr->attr.name); | 92 | dev_dbg(dev, "ds1682_store() called on %s\n", attr->attr.name); |
94 | 93 | ||
95 | /* Decode input */ | 94 | /* Decode input */ |
96 | val = simple_strtoull(buf, &endp, 0); | 95 | rc = kstrtoull(buf, 0, &val); |
97 | if (buf == endp) { | 96 | if (rc < 0) { |
98 | dev_dbg(dev, "input string not a number\n"); | 97 | dev_dbg(dev, "input string not a number\n"); |
99 | return -EINVAL; | 98 | return -EINVAL; |
100 | } | 99 | } |