提交 40300745 编写于 作者: S Sebastien Bourdelin 提交者: Greg Kroah-Hartman

misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()

simple_strtoull() is obsolete, use the newer kstrtoull() instead.
Signed-off-by: NSebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 32d9dbe3
......@@ -85,7 +85,6 @@ static ssize_t ds1682_store(struct device *dev, struct device_attribute *attr,
{
struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
struct i2c_client *client = to_i2c_client(dev);
char *endp;
u64 val;
__le32 val_le;
int rc;
......@@ -93,8 +92,8 @@ static ssize_t ds1682_store(struct device *dev, struct device_attribute *attr,
dev_dbg(dev, "ds1682_store() called on %s\n", attr->attr.name);
/* Decode input */
val = simple_strtoull(buf, &endp, 0);
if (buf == endp) {
rc = kstrtoull(buf, 0, &val);
if (rc < 0) {
dev_dbg(dev, "input string not a number\n");
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册