[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <001401ce844f$d4047db0$7c0d7910$@samsung.com>
Date: Fri, 19 Jul 2013 16:16:03 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Evgeniy Polyakov' <zbr@...emap.net>
Cc: linux-kernel@...r.kernel.org, Jingoo Han <jg1.han@...sung.com>
Subject: [PATCH] w1: 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@...sung.com>
---
drivers/w1/w1.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 0459df8..46a8fd7 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists