From: Jingoo Han Date: Wed, 11 Sep 2013 21:26:03 +0000 (-0700) Subject: drivers/w1/w1.c: replace strict_strtol() with kstrtol() X-Git-Tag: v3.12-rc1~52^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf4228f0ef662f11252f8cde7fa92979e4ac6b69;p=profile%2Fcommon%2Fkernel-common.git 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 Cc: Evgeniy Polyakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 22013ca..c7c64f1 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, { 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; @@ -266,9 +268,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;