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>
This commit is contained in:
Joe Rouvier
2008-08-10 00:29:25 -04:00
committed by Dmitry Torokhov
parent 82a196f481
commit 160f1fef7e
6 changed files with 53 additions and 51 deletions

View File

@@ -461,10 +461,11 @@ static ssize_t ads7846_disable_store(struct device *dev,
const char *buf, size_t count)
{
struct ads7846 *ts = dev_get_drvdata(dev);
char *endp;
int i;
long i;
if (strict_strtoul(buf, 10, &i))
return -EINVAL;
i = simple_strtoul(buf, &endp, 10);
spin_lock_irq(&ts->lock);
if (i)