diff options
Diffstat (limited to 'drivers/input/input-polldev.c')
-rw-r--r-- | drivers/input/input-polldev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index b253973881b8..7f161d93203c 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/input-polldev.h> | 18 | #include <linux/input-polldev.h> |
18 | 19 | ||
19 | MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>"); | 20 | MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>"); |
@@ -83,10 +84,12 @@ static ssize_t input_polldev_set_poll(struct device *dev, | |||
83 | { | 84 | { |
84 | struct input_polled_dev *polldev = dev_get_drvdata(dev); | 85 | struct input_polled_dev *polldev = dev_get_drvdata(dev); |
85 | struct input_dev *input = polldev->input; | 86 | struct input_dev *input = polldev->input; |
86 | unsigned long interval; | 87 | unsigned int interval; |
88 | int err; | ||
87 | 89 | ||
88 | if (strict_strtoul(buf, 0, &interval)) | 90 | err = kstrtouint(buf, 0, &interval); |
89 | return -EINVAL; | 91 | if (err) |
92 | return err; | ||
90 | 93 | ||
91 | if (interval < polldev->poll_interval_min) | 94 | if (interval < polldev->poll_interval_min) |
92 | return -EINVAL; | 95 | return -EINVAL; |