diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-11-02 00:13:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-03 17:46:01 +0300 |
commit | a8bc8cc193c69e41df5e757d1a592346526e136d (patch) | |
tree | c9ac42776fe618b646209abe23e89a2ed4156399 /drivers/usb/gadget/configfs.c | |
parent | 372488c6936f4e7734e4ff5613c504affb49ff68 (diff) | |
download | linux-a8bc8cc193c69e41df5e757d1a592346526e136d.tar.xz |
usb: gadget: 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 <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/09bc980d8432a4b5f7d88388ec0df5b085583139.1667336095.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/configfs.c')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 3a6b4926193e..96121d1c8df4 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -3,6 +3,7 @@ #include <linux/module.h> #include <linux/slab.h> #include <linux/device.h> +#include <linux/kstrtox.h> #include <linux/nls.h> #include <linux/usb/composite.h> #include <linux/usb/gadget_configfs.h> @@ -800,7 +801,7 @@ static ssize_t os_desc_use_store(struct config_item *item, const char *page, bool use; mutex_lock(&gi->lock); - ret = strtobool(page, &use); + ret = kstrtobool(page, &use); if (!ret) { gi->use_os_desc = use; ret = len; |