All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: Replace simple_strtol by kstrtoint
@ 2018-10-28  6:39 Muchun Song
  0 siblings, 0 replies; only message in thread
From: Muchun Song @ 2018-10-28  6:39 UTC (permalink / raw)
  To: gregkh, rafael; +Cc: linux-kernel

The simple_strtol() function is deprecated, use kstrtoint() instead.

Signed-off-by: Muchun Song <smuchun@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-28  6:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28  6:39 [PATCH] driver core: Replace simple_strtol by kstrtoint Muchun Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.