diff options
author | Joe Rouvier <joe@rouvier.org> | 2008-08-10 00:29:25 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-09-10 12:11:57 -0400 |
commit | 160f1fef7e52e974489b3c70fbd4e094c06965c2 (patch) | |
tree | 80423a45a9a57736e6ce6351da0801e1a5b02b8c /drivers/input/touchscreen/ads7846.c | |
parent | 82a196f481661170b4982dc7e68a12e9253309d0 (diff) |
Input: convert drivers to use strict_strtoul()
strict_strtoul() allows newline character at the end of the the input
string and therefore is more user-friendly.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index ce6f48c695f5..efbbbe48621a 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -461,10 +461,11 @@ static ssize_t ads7846_disable_store(struct device *dev, | |||
461 | const char *buf, size_t count) | 461 | const char *buf, size_t count) |
462 | { | 462 | { |
463 | struct ads7846 *ts = dev_get_drvdata(dev); | 463 | struct ads7846 *ts = dev_get_drvdata(dev); |
464 | char *endp; | 464 | long i; |
465 | int i; | 465 | |
466 | if (strict_strtoul(buf, 10, &i)) | ||
467 | return -EINVAL; | ||
466 | 468 | ||
467 | i = simple_strtoul(buf, &endp, 10); | ||
468 | spin_lock_irq(&ts->lock); | 469 | spin_lock_irq(&ts->lock); |
469 | 470 | ||
470 | if (i) | 471 | if (i) |