diff options
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/main.c | 1 | ||||
-rw-r--r-- | drivers/staging/speakup/speakup.h | 1 | ||||
-rw-r--r-- | drivers/staging/speakup/speakup_soft.c | 9 |
3 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 42fcf7e..8be5604 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -23,7 +23,6 @@ */ #include <linux/kernel.h> -#include <linux/version.h> #include <linux/vt.h> #include <linux/tty.h> #include <linux/mm.h> /* __get_free_page() and friends */ diff --git a/drivers/staging/speakup/speakup.h b/drivers/staging/speakup/speakup.h index 46edabe..412b879 100644 --- a/drivers/staging/speakup/speakup.h +++ b/drivers/staging/speakup/speakup.h @@ -1,6 +1,5 @@ #ifndef _SPEAKUP_H #define _SPEAKUP_H -#include <linux/version.h> #include "spk_types.h" #include "i18n.h" diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c index a2c3dc4..42cdafe 100644 --- a/drivers/staging/speakup/speakup_soft.c +++ b/drivers/staging/speakup/speakup_soft.c @@ -273,15 +273,8 @@ static ssize_t softsynth_write(struct file *fp, const char *buf, size_t count, { unsigned long supplied_index = 0; int converted; - char indbuf[5]; - if (count >= sizeof(indbuf)) - return -EINVAL; - if (copy_from_user(indbuf, buf, count)) - return -EFAULT; - indbuf[count] = '\0'; - - converted = strict_strtoul(indbuf, 0, &supplied_index); + converted = kstrtoul_from_user(buf, count, 0, &supplied_index); if (converted < 0) return converted; |