* [PATCH] misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()
@ 2014-03-26 20:11 Sebastien Bourdelin
2014-04-01 6:27 ` [lm-sensors] " Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Sebastien Bourdelin @ 2014-03-26 20:11 UTC (permalink / raw)
To: lm-sensors; +Cc: jerome.oufella, linux-kernel, Sebastien Bourdelin
simple_strtoull() is obsolete, use the newer kstrtoull() instead.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
---
drivers/misc/ds1682.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c
index 154b02e..155a150 100644
--- a/drivers/misc/ds1682.c
+++ b/drivers/misc/ds1682.c
@@ -86,7 +86,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;
@@ -94,8 +93,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;
}
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull()
2014-03-26 20:11 [PATCH] misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull() Sebastien Bourdelin
@ 2014-04-01 6:27 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2014-04-01 6:27 UTC (permalink / raw)
To: Sebastien Bourdelin; +Cc: lm-sensors, linux-kernel, jerome.oufella
Hi Sebastien,
On Wed, 26 Mar 2014 16:11:04 -0400, Sebastien Bourdelin wrote:
> simple_strtoull() is obsolete, use the newer kstrtoull() instead.
>
> Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
> ---
> drivers/misc/ds1682.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> (...)
You are sending this patch to the wrong list. The ds1682 driver has
nothing to do with lm-sensors. Please use ./scripts/get_maintainer.pl
to figure out who this patch should be sent to.
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-01 6:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-26 20:11 [PATCH] misc: (ds1682) replace obsolete simple_strtoull() with kstrtoull() Sebastien Bourdelin
2014-04-01 6:27 ` [lm-sensors] " Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®