lkml.org 
[lkml]   [2019]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] staging: speakup: Replace simple_strtoul with kstrtoul
simple_strtoul is obsolete. Change it to kstrtoul. Kernel is building
and booting successfully.

Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
---
drivers/staging/speakup/kobjects.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
index 2e36d87..ad5a2b2 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -787,7 +787,9 @@ static ssize_t message_store_helper(const char *buf, size_t count,
continue;
}

- index = simple_strtoul(cp, &temp, 10);
+ retval = kstrtoul(cp, 0, &index);
+ if (retval)
+ return retval;

while ((temp < linefeed) && (*temp == ' ' || *temp == '\t'))
temp++;
--
2.7.4
\
 
 \ /
  Last update: 2019-02-23 20:33    [W:0.026 / U:24.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site