OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7191b61
)
macintosh/ams: Replace strict_strtoul() with kstrtoul()
author
Jingoo Han
<jg1.han@samsung.com>
Fri, 19 Jul 2013 07:16:56 +0000
(16:16 +0900)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:57:43 +0000
(14:57 +1000)
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>
drivers/macintosh/ams/ams-input.c
patch
|
blob
|
history
diff --git
a/drivers/macintosh/ams/ams-input.c
b/drivers/macintosh/ams/ams-input.c
index
b27e530
..
2edae7d
100644
(file)
--- 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);