diff options
author | JJ Ding <dgdunix@gmail.com> | 2011-11-09 13:20:14 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-10 00:23:26 -0500 |
commit | 76496e7a02e99d42844f4fffa145b81e513e7acd (patch) | |
tree | 33812cc8a9b250a95cf90c237c46ec6fc6fcf2ff /drivers/input/touchscreen/ads7846.c | |
parent | 7cf801cfc0774b777aa6861cf4a43a90b112b1ed (diff) |
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/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index d507b9b67806..c69536c97c0f 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -601,10 +601,12 @@ static ssize_t ads7846_disable_store(struct device *dev, | |||
601 | const char *buf, size_t count) | 601 | const char *buf, size_t count) |
602 | { | 602 | { |
603 | struct ads7846 *ts = dev_get_drvdata(dev); | 603 | struct ads7846 *ts = dev_get_drvdata(dev); |
604 | unsigned long i; | 604 | unsigned int i; |
605 | int err; | ||
605 | 606 | ||
606 | if (strict_strtoul(buf, 10, &i)) | 607 | err = kstrtouint(buf, 10, &i); |
607 | return -EINVAL; | 608 | if (err) |
609 | return err; | ||
608 | 610 | ||
609 | if (i) | 611 | if (i) |
610 | ads7846_disable(ts); | 612 | ads7846_disable(ts); |