Skip to contentSkip to conversation

power: power: replace strict_strtol() with kstrtol()

PATCH Applied Jingoo Han 2 participants 2 messages Jul 19, 2013 – Aug 9, 2013

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 power: power: replace strict_strtol() with kstrtol()

The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used.

---
 drivers/power/power_supply_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/power_supply_sysfs.c +1 -1
index 29178f7..44420d1 100644
@@ -118,7 +118,7 @@ static ssize_t power_supply_store_property(struct device *dev,
 	long long_val;
 
 	/* TODO: support other types than int */
-	ret = strict_strtol(buf, 10, &long_val);
+	ret = kstrtol(buf, 10, &long_val);
 	if (ret < 0)
 		return ret;
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 6 lines · Jingoo Han

The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used.

---

Applied, thanks.

Quoted 18 lines
 drivers/power/power_supply_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/power_supply_sysfs.c +1 -1
index 29178f7..44420d1 100644
@@ -118,7 +118,7 @@ static ssize_t power_supply_store_property(struct device *dev,
 	long long_val;
 
 	/* TODO: support other types than int */
-	ret = strict_strtol(buf, 10, &long_val);
+	ret = kstrtol(buf, 10, &long_val);
 	if (ret < 0)
 		return ret;
 
Signature · 1 line
1.7.10.4