diff options
author | Christophe JAILLET <[email protected]> | 2022-11-01 22:13:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-11-10 19:03:58 +0100 |
commit | 0d4a030b3db1b53498f1c1ae243677fa0dd2e7ce (patch) | |
tree | 4469a5ebca4e15bbc12fcb4093c0d2b5f6e505ba | |
parent | 763dc90e9a4332f82ad43c866c6878742b15d4ab (diff) |
greybus: svc: 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: Christophe JAILLET <[email protected]>
Reviewed-by: Johan Hovold <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Link: https://lore.kernel.org/r/ebf1e6988a53a455990230a37cf759ee542ea7ec.1667336095.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/greybus/svc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c index 56d2b44d6fef..16cced80867a 100644 --- a/drivers/greybus/svc.c +++ b/drivers/greybus/svc.c @@ -7,6 +7,7 @@ */ #include <linux/debugfs.h> +#include <linux/kstrtox.h> #include <linux/workqueue.h> #include <linux/greybus.h> @@ -83,7 +84,7 @@ static ssize_t watchdog_store(struct device *dev, int retval; bool user_request; - retval = strtobool(buf, &user_request); + retval = kstrtobool(buf, &user_request); if (retval) return retval; |