diff options
Diffstat (limited to 'drivers/input/input-polldev.c')
-rw-r--r-- | drivers/input/input-polldev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 7dfe1009fae0..7f161d93203c 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -84,10 +84,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; |