Input: convert obsolete strict_strtox to kstrtox

With commit 67d0a07544 we mark strict_strtox
as obsolete. Convert all remaining such uses in drivers/input/.

Also change long to appropriate types, and return error conditions
from kstrtox separately, as Dmitry sugguests.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
JJ Ding
2011-11-09 10:20:14 -08:00
committed by Dmitry Torokhov
parent 7cf801cfc0
commit 76496e7a02
15 changed files with 173 additions and 104 deletions

View File

@@ -155,9 +155,14 @@ static ssize_t ps2pp_attr_show_smartscroll(struct psmouse *psmouse,
static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data,
const char *buf, size_t count)
{
unsigned long value;
unsigned int value;
int err;
if (strict_strtoul(buf, 10, &value) || value > 1)
err = kstrtouint(buf, 10, &value);
if (err)
return err;
if (value > 1)
return -EINVAL;
ps2pp_set_smartscroll(psmouse, value);