提交 def7b92e 编写于 作者: C Christophe JAILLET 提交者: Luis Chamberlain

kernel/params.c: Use kstrtobool() instead of strtobool()

strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.

In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.

While at it, include the corresponding header file (<linux/kstrtox.h>)
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: NMiroslav Benes <mbenes@suse.cz>
Signed-off-by: NLuis Chamberlain <mcgrof@kernel.org>
上级 c093a74d
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/kstrtox.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp) ...@@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp)
if (!val) val = "1"; if (!val) val = "1";
/* One of =[yYnN01] */ /* One of =[yYnN01] */
return strtobool(val, kp->arg); return kstrtobool(val, kp->arg);
} }
EXPORT_SYMBOL(param_set_bool); EXPORT_SYMBOL(param_set_bool);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册