From 60f07c29e035b2554db951b494dd804317c230d3 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 7 Nov 2022 11:40:05 -0800 Subject: Input: 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 () Signed-off-by: Christophe JAILLET Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/4311e9cb62687449f4175e2b062abcd77aada059.1667336095.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov --- drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/input/input.c') diff --git a/drivers/input/input.c b/drivers/input/input.c index ebb2b7f0f8ff..783961df3626 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "input-compat.h" @@ -1465,7 +1466,7 @@ static ssize_t inhibited_store(struct device *dev, ssize_t rv; bool inhibited; - if (strtobool(buf, &inhibited)) + if (kstrtobool(buf, &inhibited)) return -EINVAL; if (inhibited) -- cgit