Input: convert obsolete strict_strtox to kstrtox

With commit 67d0a07544 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>
This commit is contained in:
JJ Ding
2011-11-09 10:20:14 -08:00
committed by Dmitry Torokhov
parent 7cf801cfc0
commit 76496e7a02
15 changed files with 173 additions and 104 deletions

View File

@@ -487,10 +487,10 @@ static ssize_t ad7877_disable_store(struct device *dev,
const char *buf, size_t count)
{
struct ad7877 *ts = dev_get_drvdata(dev);
unsigned long val;
unsigned int val;
int error;
error = strict_strtoul(buf, 10, &val);
error = kstrtouint(buf, 10, &val);
if (error)
return error;
@@ -517,10 +517,10 @@ static ssize_t ad7877_dac_store(struct device *dev,
const char *buf, size_t count)
{
struct ad7877 *ts = dev_get_drvdata(dev);
unsigned long val;
unsigned int val;
int error;
error = strict_strtoul(buf, 10, &val);
error = kstrtouint(buf, 10, &val);
if (error)
return error;
@@ -547,10 +547,10 @@ static ssize_t ad7877_gpio3_store(struct device *dev,
const char *buf, size_t count)
{
struct ad7877 *ts = dev_get_drvdata(dev);
unsigned long val;
unsigned int val;
int error;
error = strict_strtoul(buf, 10, &val);
error = kstrtouint(buf, 10, &val);
if (error)
return error;
@@ -578,10 +578,10 @@ static ssize_t ad7877_gpio4_store(struct device *dev,
const char *buf, size_t count)
{
struct ad7877 *ts = dev_get_drvdata(dev);
unsigned long val;
unsigned int val;
int error;
error = strict_strtoul(buf, 10, &val);
error = kstrtouint(buf, 10, &val);
if (error)
return error;

View File

@@ -339,10 +339,10 @@ static ssize_t ad7879_disable_store(struct device *dev,
const char *buf, size_t count)
{
struct ad7879 *ts = dev_get_drvdata(dev);
unsigned long val;
unsigned int val;
int error;
error = strict_strtoul(buf, 10, &val);
error = kstrtouint(buf, 10, &val);
if (error)
return error;

View File

@@ -601,10 +601,12 @@ static ssize_t ads7846_disable_store(struct device *dev,
const char *buf, size_t count)
{
struct ads7846 *ts = dev_get_drvdata(dev);
unsigned long i;
unsigned int i;
int err;
if (strict_strtoul(buf, 10, &i))
return -EINVAL;
err = kstrtouint(buf, 10, &i);
if (err)
return err;
if (i)
ads7846_disable(ts);