diff options
author | Christophe JAILLET <[email protected]> | 2022-11-01 22:14:06 +0100 |
---|---|---|
committer | Luis Chamberlain <[email protected]> | 2023-01-25 14:07:21 -0800 |
commit | fbed4fea6422a237382bf317db88a37993955f3b (patch) | |
tree | 981fdc5d1f44ce458e5f04caa499535e3bc54bc3 | |
parent | def7b92efd868a6c78da86770704c1a03506016e (diff) |
module: 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: Luis Chamberlain <[email protected]>
Reviewed-by: Aaron Tomlin <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
-rw-r--r-- | kernel/module/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c index 4ac3fe43e6c8..d3be89de706d 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -17,6 +17,7 @@ #include <linux/fs.h> #include <linux/kernel.h> #include <linux/kernel_read_file.h> +#include <linux/kstrtox.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/elf.h> @@ -2675,7 +2676,7 @@ static int unknown_module_param_cb(char *param, char *val, const char *modname, int ret; if (strcmp(param, "async_probe") == 0) { - if (strtobool(val, &mod->async_probe_requested)) + if (kstrtobool(val, &mod->async_probe_requested)) mod->async_probe_requested = true; return 0; } |