diff options
author | JJ Ding <dgdunix@gmail.com> | 2011-11-09 10:20:14 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-09 21:23:26 -0800 |
commit | 76496e7a02e99d42844f4fffa145b81e513e7acd (patch) | |
tree | 33812cc8a9b250a95cf90c237c46ec6fc6fcf2ff /drivers/input/input-polldev.c | |
parent | 7cf801cfc0774b777aa6861cf4a43a90b112b1ed (diff) | |
download | linux-76496e7a02e99d42844f4fffa145b81e513e7acd.tar.gz linux-76496e7a02e99d42844f4fffa145b81e513e7acd.tar.bz2 linux-76496e7a02e99d42844f4fffa145b81e513e7acd.zip |
Input: convert obsolete strict_strtox to kstrtox
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a 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>
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 b253973881b8..1986a52a7ab9 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -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; |