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:
@@ -83,10 +83,12 @@ static ssize_t input_polldev_set_poll(struct device *dev,
|
||||
{
|
||||
struct input_polled_dev *polldev = dev_get_drvdata(dev);
|
||||
struct input_dev *input = polldev->input;
|
||||
unsigned long interval;
|
||||
unsigned int interval;
|
||||
int err;
|
||||
|
||||
if (strict_strtoul(buf, 0, &interval))
|
||||
return -EINVAL;
|
||||
err = kstrtouint(buf, 0, &interval);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (interval < polldev->poll_interval_min)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user