[PATCH] driver core: Replace simple_strtol by kstrtoint
From: Muchun Song
Date: Sun Oct 28 2018 - 02:39:37 EST
The simple_strtol() function is deprecated, use kstrtoint() instead.
Signed-off-by: Muchun Song <smuchun@xxxxxxxxx>
---
drivers/base/dd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 169412ee4ae8..940abad069c0 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -223,7 +223,10 @@ DEFINE_SHOW_ATTRIBUTE(deferred_devs);
static int deferred_probe_timeout = -1;
static int __init deferred_probe_timeout_setup(char *str)
{
- deferred_probe_timeout = simple_strtol(str, NULL, 10);
+ int timeout;
+
+ if (!kstrtoint(str, 10, &timeout))
+ deferred_probe_timeout = timeout;
return 1;
}
__setup("deferred_probe_timeout=", deferred_probe_timeout_setup);
--
2.17.1