Commit bf4228f0 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

drivers/w1/w1.c: replace strict_strtol() with kstrtol()

The usage of strict_strtol() is not preferred, because strict_strtol() is
obsolete.  Thus, kstrtol() should be used.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0ab30494
...@@ -234,9 +234,11 @@ static ssize_t w1_master_attribute_store_search(struct device * dev, ...@@ -234,9 +234,11 @@ static ssize_t w1_master_attribute_store_search(struct device * dev,
{ {
long tmp; long tmp;
struct w1_master *md = dev_to_w1_master(dev); struct w1_master *md = dev_to_w1_master(dev);
int ret;
if (strict_strtol(buf, 0, &tmp) == -EINVAL) ret = kstrtol(buf, 0, &tmp);
return -EINVAL; if (ret)
return ret;
mutex_lock(&md->mutex); mutex_lock(&md->mutex);
md->search_count = tmp; md->search_count = tmp;
...@@ -266,9 +268,11 @@ static ssize_t w1_master_attribute_store_pullup(struct device *dev, ...@@ -266,9 +268,11 @@ static ssize_t w1_master_attribute_store_pullup(struct device *dev,
{ {
long tmp; long tmp;
struct w1_master *md = dev_to_w1_master(dev); struct w1_master *md = dev_to_w1_master(dev);
int ret;
if (strict_strtol(buf, 0, &tmp) == -EINVAL) ret = kstrtol(buf, 0, &tmp);
return -EINVAL; if (ret)
return ret;
mutex_lock(&md->mutex); mutex_lock(&md->mutex);
md->enable_pullup = tmp; md->enable_pullup = tmp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment