Skip to content

Commit

Permalink
misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastien Bourdelin authored and Greg Kroah-Hartman committed May 3, 2014
1 parent 32d9dbe commit 4030074
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/misc/ds1682.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,15 @@ 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;

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;
}
Expand Down

0 comments on commit 4030074

Please sign in to comment.