Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sebastien Bourdelin and committed by
Greg Kroah-Hartman
40300745 32d9dbe3

+2 -3
+2 -3
drivers/misc/ds1682.c
··· 85 85 { 86 86 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); 87 87 struct i2c_client *client = to_i2c_client(dev); 88 - char *endp; 89 88 u64 val; 90 89 __le32 val_le; 91 90 int rc; ··· 92 93 dev_dbg(dev, "ds1682_store() called on %s\n", attr->attr.name); 93 94 94 95 /* Decode input */ 95 - val = simple_strtoull(buf, &endp, 0); 96 - if (buf == endp) { 96 + rc = kstrtoull(buf, 0, &val); 97 + if (rc < 0) { 97 98 dev_dbg(dev, "input string not a number\n"); 98 99 return -EINVAL; 99 100 }