Skip to content

Commit

Permalink
platform: replace strict_strto*() with kstrto*()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Jingoo Han authored and Matthew Garrett committed Sep 5, 2013
1 parent 2ff1af7 commit 0db7fd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/platform/x86/classmate-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 4 additions & 2 deletions drivers/platform/x86/compal-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0db7fd9

Please sign in to comment.