[PATCH 26/52] kstrtox: convert drivers/macintosh/

From: Alexey Dobriyan
Date: Sat Feb 05 2011 - 09:28:00 EST



Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
drivers/macintosh/ams/ams-input.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/macintosh/ams/ams-input.c b/drivers/macintosh/ams/ams-input.c
index 8a71239..d4a6a64 100644
--- a/drivers/macintosh/ams/ams-input.c
+++ b/drivers/macintosh/ams/ams-input.c
@@ -116,10 +116,13 @@ static ssize_t ams_input_show_joystick(struct device *dev,
static ssize_t ams_input_store_joystick(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
- unsigned long enable;
- int error = 0;
+ unsigned int enable;
+ int error;

- if (strict_strtoul(buf, 0, &enable) || enable > 1)
+ error = kstrtouint(buf, 0, &enable);
+ if (error < 0)
+ return error;
+ if (enable > 1)
return -EINVAL;

mutex_lock(&ams_input_mutex);
--
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/