w1: replace strict_strtol() with kstrtol()
PATCH 1/1 w1: replace strict_strtol() with kstrtol()
The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used.
--- drivers/w1/w1.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/w1/w1.c +8 -4
@@ -235,9 +235,11 @@ static ssize_t w1_master_attribute_store_search(struct device * dev, {long tmp;struct w1_master *md =dev_to_w1_master (dev); +int ret; -if (strict_strtol (buf,0 , &tmp) == -EINVAL ) -return -EINVAL ; + ret =kstrtol (buf,0 , &tmp); +if (ret) +return ret;mutex_lock (&md->mutex); md->search_count = tmp;
@@ -267,9 +269,11 @@ static ssize_t w1_master_attribute_store_pullup(struct device *dev, {long tmp;struct w1_master *md =dev_to_w1_master (dev); +int ret; -if (strict_strtol (buf,0 , &tmp) == -EINVAL ) -return -EINVAL ; + ret =kstrtol (buf,0 , &tmp); +if (ret) +return ret;mutex_lock (&md->mutex); md->enable_pullup = tmp;
Signature · 1 line
1.7.10.4
Hi everyone
19.07.2013, 11:16, "Jingoo Han" <[email protected]>:
Quoted 3 lines
The usage of
strict_strtol()is not preferred, becausestrict_strtol()is obsolete. Thus,kstrtol()should be used.
Looks good to me, although I do not really see the difference Greg, please pull into your tree or suggest appropriate.
Quoted 11 lines · Evgeniy Polyakov
Hi everyone
19.07.2013, 11:16, "Jingoo Han" <[email protected]>:
Quoted 3 lines
The usage of
strict_strtol()is not preferred, becausestrict_strtol()is obsolete. Thus,kstrtol()should be used.Looks good to me, although I do not really see the difference Greg, please pull into your tree or suggest appropriate.
Acked-by Evgeniy Polyakov <[email protected]>
Can someone resend this, I don't seem to be able to find it...
thanks,
greg k-h
27.07.2013, 03:16, "GregKH" <[email protected]>:
Quoted 8 lines · Evgeniy Polyakov
Quoted 7 lines
Hi everyone
19.07.2013, 11:16, "Jingoo Han" <[email protected]>:
Quoted 3 lines
The usage of
strict_strtol()is not preferred, becausestrict_strtol()is obsolete. Thus,kstrtol()should be used.
Quoted 6 lines
Quoted 4 lines
Looks good to me, although I do not really see the difference Greg, please pull into your tree or suggest appropriate.
Acked-by Evgeniy Polyakov <[email protected]>Can someone resend this, I don't seem to be able to find it...
Looks like Andrew Morton picked it up today