Commit 34da5e6770ac06df770a0355b417155e6e84e263

Authored by Jingoo Han
Committed by Greg Kroah-Hartman
1 parent 86df268705

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: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 4 changed files with 5 additions and 5 deletions Side-by-side Diff

... ... @@ -38,7 +38,7 @@
38 38 #endif
39 39 static __init int sysfs_deprecated_setup(char *arg)
40 40 {
41   - return strict_strtol(arg, 10, &sysfs_deprecated);
  41 + return kstrtol(arg, 10, &sysfs_deprecated);
42 42 }
43 43 early_param("sysfs.deprecated", sysfs_deprecated_setup);
44 44 #endif
drivers/base/memory.c
... ... @@ -469,7 +469,7 @@
469 469 u64 pfn;
470 470 if (!capable(CAP_SYS_ADMIN))
471 471 return -EPERM;
472   - if (strict_strtoull(buf, 0, &pfn) < 0)
  472 + if (kstrtoull(buf, 0, &pfn) < 0)
473 473 return -EINVAL;
474 474 pfn >>= PAGE_SHIFT;
475 475 if (!pfn_valid(pfn))
... ... @@ -488,7 +488,7 @@
488 488 u64 pfn;
489 489 if (!capable(CAP_SYS_ADMIN))
490 490 return -EPERM;
491   - if (strict_strtoull(buf, 0, &pfn) < 0)
  491 + if (kstrtoull(buf, 0, &pfn) < 0)
492 492 return -EINVAL;
493 493 pfn >>= PAGE_SHIFT;
494 494 ret = memory_failure(pfn, 0, 0);
drivers/base/power/sysfs.c
... ... @@ -206,7 +206,7 @@
206 206 if (!dev->power.use_autosuspend)
207 207 return -EIO;
208 208  
209   - if (strict_strtol(buf, 10, &delay) != 0 || delay != (int) delay)
  209 + if (kstrtol(buf, 10, &delay) != 0 || delay != (int) delay)
210 210 return -EINVAL;
211 211  
212 212 device_lock(dev);
drivers/base/regmap/regmap-debugfs.c
... ... @@ -281,7 +281,7 @@
281 281 reg = simple_strtoul(start, &start, 16);
282 282 while (*start == ' ')
283 283 start++;
284   - if (strict_strtoul(start, 16, &value))
  284 + if (kstrtoul(start, 16, &value))
285 285 return -EINVAL;
286 286  
287 287 /* Userspace has been fiddling around behind the kernel's back */