summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/ams
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-19 16:16:56 +0900
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-08-14 14:57:43 +1000
commit7033b64b48a3eafdd5d5f541ff6ccb96f69d9911 (patch)
tree8f3d7a812f6f4463a5ae7100d768160cd0ec8817 /drivers/macintosh/ams
parent7191b615759ec10cab9eea43be5ecc42cda82364 (diff)
downloadlinux-7033b64b48a3eafdd5d5f541ff6ccb96f69d9911.tar.bz2
macintosh/ams: Replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/ams')
-rw-r--r--drivers/macintosh/ams/ams-input.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/macintosh/ams/ams-input.c b/drivers/macintosh/ams/ams-input.c
index b27e530a87a4..2edae7dfcab2 100644
--- a/drivers/macintosh/ams/ams-input.c
+++ b/drivers/macintosh/ams/ams-input.c
@@ -118,8 +118,12 @@ static ssize_t ams_input_store_joystick(struct device *dev,
{
unsigned long enable;
int error = 0;
+ int ret;
- if (strict_strtoul(buf, 0, &enable) || enable > 1)
+ ret = kstrtoul(buf, 0, &enable);
+ if (ret)
+ return ret;
+ if (enable > 1)
return -EINVAL;
mutex_lock(&ams_input_mutex);