aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-09-11 17:26:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 18:59:35 -0400
commitbf4228f0ef662f11252f8cde7fa92979e4ac6b69 (patch)
tree796b03aafc3600292efceb3a50a64812bebaf18c /drivers/w1/w1.c
parent0ab30494bc4f3bc1ea4659b7c5d97c5218554a63 (diff)
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: Jingoo Han <jg1.han@samsung.com> Cc: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r--drivers/w1/w1.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 22013ca2119c..c7c64f18773d 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -234,9 +234,11 @@ static ssize_t w1_master_attribute_store_search(struct device * dev,
234{ 234{
235 long tmp; 235 long tmp;
236 struct w1_master *md = dev_to_w1_master(dev); 236 struct w1_master *md = dev_to_w1_master(dev);
237 int ret;
237 238
238 if (strict_strtol(buf, 0, &tmp) == -EINVAL) 239 ret = kstrtol(buf, 0, &tmp);
239 return -EINVAL; 240 if (ret)
241 return ret;
240 242
241 mutex_lock(&md->mutex); 243 mutex_lock(&md->mutex);
242 md->search_count = tmp; 244 md->search_count = tmp;
@@ -266,9 +268,11 @@ static ssize_t w1_master_attribute_store_pullup(struct device *dev,
266{ 268{
267 long tmp; 269 long tmp;
268 struct w1_master *md = dev_to_w1_master(dev); 270 struct w1_master *md = dev_to_w1_master(dev);
271 int ret;
269 272
270 if (strict_strtol(buf, 0, &tmp) == -EINVAL) 273 ret = kstrtol(buf, 0, &tmp);
271 return -EINVAL; 274 if (ret)
275 return ret;
272 276
273 mutex_lock(&md->mutex); 277 mutex_lock(&md->mutex);
274 md->enable_pullup = tmp; 278 md->enable_pullup = tmp;