Skip to contentSkip to conversation

platform: replace strict_strto*() with kstrto*()

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

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 platform: replace strict_strto*() with kstrto*()

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

---
 drivers/platform/x86/classmate-laptop.c |    2 +-
 drivers/platform/x86/compal-laptop.c    |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/platform/x86/classmate-laptop.c +1 -1
index 36e5e6c..6dfa8d3 100644
@@ -590,7 +590,7 @@ static ssize_t cmpc_accel_sensitivity_store(struct device *dev,
 	inputdev = dev_get_drvdata(&acpi->dev);
 	accel = dev_get_drvdata(&inputdev->dev);
 
-	r = strict_strtoul(buf, 0, &sensitivity);
+	r = kstrtoul(buf, 0, &sensitivity);
 	if (r)
 		return r;
 
drivers/platform/x86/compal-laptop.c +4 -2
index 475cc52..52f89fc 100644
@@ -425,7 +425,8 @@ static ssize_t pwm_enable_store(struct device *dev,
 	struct compal_data *data = dev_get_drvdata(dev);
 	long val;
 	int err;
-	err = strict_strtol(buf, 10, &val);
+
+	err = kstrtol(buf, 10, &val);
 	if (err)
 		return err;
 	if (val < 0)
@@ -463,7 +464,8 @@ static ssize_t pwm_store(struct device *dev, struct device_attribute *attr,
 	struct compal_data *data = dev_get_drvdata(dev);
 	long val;
 	int err;
-	err = strict_strtol(buf, 10, &val);
+
+	err = kstrtol(buf, 10, &val);
 	if (err)
 		return err;
 	if (val < 0 || val > 255)
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 3 lines · Jingoo Han

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

Applied, thanks.

Signature · 1 line
Matthew Garrett <[email protected]>