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:
committed by
Dmitry Torokhov
parent
82a196f481
commit
160f1fef7e
@@ -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)
|
||||
|
Reference in New Issue
Block a user