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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user