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

@@ -789,11 +789,14 @@ static ssize_t hgpk_set_powered(struct psmouse *psmouse, void *data,
const char *buf, size_t count)
{
struct hgpk_data *priv = psmouse->private;
unsigned long value;
unsigned int value;
int err;
err = strict_strtoul(buf, 10, &value);
if (err || value > 1)
err = kstrtouint(buf, 10, &value);
if (err)
return err;
if (value > 1)
return -EINVAL;
if (value != priv->powered) {
@@ -881,11 +884,14 @@ static ssize_t hgpk_trigger_recal(struct psmouse *psmouse, void *data,
const char *buf, size_t count)
{
struct hgpk_data *priv = psmouse->private;
unsigned long value;
unsigned int value;
int err;
err = strict_strtoul(buf, 10, &value);
if (err || value != 1)
err = kstrtouint(buf, 10, &value);
if (err)
return err;
if (value != 1)
return -EINVAL;
/*