Commit 34da5e67 authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman

driver core: replace strict_strto*() with kstrto*()

The usage of strict_strto*() is not preferred, because
strict_strto*() is obsolete. Thus, kstrto*() should be
used.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 86df2687
...@@ -38,7 +38,7 @@ long sysfs_deprecated = 0; ...@@ -38,7 +38,7 @@ long sysfs_deprecated = 0;
#endif #endif
static __init int sysfs_deprecated_setup(char *arg) static __init int sysfs_deprecated_setup(char *arg)
{ {
return strict_strtol(arg, 10, &sysfs_deprecated); return kstrtol(arg, 10, &sysfs_deprecated);
} }
early_param("sysfs.deprecated", sysfs_deprecated_setup); early_param("sysfs.deprecated", sysfs_deprecated_setup);
#endif #endif
......
...@@ -469,7 +469,7 @@ store_soft_offline_page(struct device *dev, ...@@ -469,7 +469,7 @@ store_soft_offline_page(struct device *dev,
u64 pfn; u64 pfn;
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if (strict_strtoull(buf, 0, &pfn) < 0) if (kstrtoull(buf, 0, &pfn) < 0)
return -EINVAL; return -EINVAL;
pfn >>= PAGE_SHIFT; pfn >>= PAGE_SHIFT;
if (!pfn_valid(pfn)) if (!pfn_valid(pfn))
...@@ -488,7 +488,7 @@ store_hard_offline_page(struct device *dev, ...@@ -488,7 +488,7 @@ store_hard_offline_page(struct device *dev,
u64 pfn; u64 pfn;
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if (strict_strtoull(buf, 0, &pfn) < 0) if (kstrtoull(buf, 0, &pfn) < 0)
return -EINVAL; return -EINVAL;
pfn >>= PAGE_SHIFT; pfn >>= PAGE_SHIFT;
ret = memory_failure(pfn, 0, 0); ret = memory_failure(pfn, 0, 0);
......
...@@ -206,7 +206,7 @@ static ssize_t autosuspend_delay_ms_store(struct device *dev, ...@@ -206,7 +206,7 @@ static ssize_t autosuspend_delay_ms_store(struct device *dev,
if (!dev->power.use_autosuspend) if (!dev->power.use_autosuspend)
return -EIO; return -EIO;
if (strict_strtol(buf, 10, &delay) != 0 || delay != (int) delay) if (kstrtol(buf, 10, &delay) != 0 || delay != (int) delay)
return -EINVAL; return -EINVAL;
device_lock(dev); device_lock(dev);
......
...@@ -281,7 +281,7 @@ static ssize_t regmap_map_write_file(struct file *file, ...@@ -281,7 +281,7 @@ static ssize_t regmap_map_write_file(struct file *file,
reg = simple_strtoul(start, &start, 16); reg = simple_strtoul(start, &start, 16);
while (*start == ' ') while (*start == ' ')
start++; start++;
if (strict_strtoul(start, 16, &value)) if (kstrtoul(start, 16, &value))
return -EINVAL; return -EINVAL;
/* Userspace has been fiddling around behind the kernel's back */ /* Userspace has been fiddling around behind the kernel's back */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment