Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40300745 authored by Sebastien Bourdelin's avatar Sebastien Bourdelin Committed by Greg Kroah-Hartman
Browse files

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



simple_strtoull() is obsolete, use the newer kstrtoull() instead.

Signed-off-by: default avatarSebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32d9dbe3
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -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 sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
	struct i2c_client *client = to_i2c_client(dev);
	struct i2c_client *client = to_i2c_client(dev);
	char *endp;
	u64 val;
	u64 val;
	__le32 val_le;
	__le32 val_le;
	int rc;
	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);
	dev_dbg(dev, "ds1682_store() called on %s\n", attr->attr.name);


	/* Decode input */
	/* Decode input */
	val = simple_strtoull(buf, &endp, 0);
	rc = kstrtoull(buf, 0, &val);
	if (buf == endp) {
	if (rc < 0) {
		dev_dbg(dev, "input string not a number\n");
		dev_dbg(dev, "input string not a number\n");
		return -EINVAL;
		return -EINVAL;
	}
	}