Skip to contentSkip to conversation

ide: replace strict_strtol() with kstrtol()

PATCH Applied Jingoo Han 2 participants 2 messages Jul 19, 2013 – Sep 5, 2013 libata

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

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

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

---
 drivers/ide/ide-park.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/ide/ide-park.c +4 -2
index 6ab9ab2..f41558a 100644
@@ -116,8 +116,10 @@ ssize_t ide_park_store(struct device *dev, struct device_attribute *attr,
 	long int input;
 	int rc;
 
-	rc = strict_strtol(buf, 10, &input);
-	if (rc || input < -2)
+	rc = kstrtol(buf, 10, &input);
+	if (rc)
+		return rc;
+	if (input < -2)
 		return -EINVAL;
 	if (input > MAX_PARK_TIMEOUT) {
 		input = MAX_PARK_TIMEOUT;
Signature · 1 line
1.7.10.4