misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()
authorSebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Tue, 1 Apr 2014 15:04:28 +0000 (11:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:26:24 +0000 (19:26 -0400)
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>
drivers/misc/ds1682.c

index 6a672f9ef522c7fe2a477f3fcc7e1001abf5996d..b909fb30232adbdc3771c8b2154d906a23e7269c 100644 (file)
@@ -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;
        }
This page took 0.027857 seconds and 5 git commands to generate.