diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-07-13 07:50:09 +0300 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2023-07-19 18:42:50 +0300 |
commit | 44f23dabdc08698b7a066300eb55db23895f5459 (patch) | |
tree | f8dbfdfd3f37b5c6b2c1c79c58e871c64fc68d51 /drivers/nvdimm/namespace_devs.c | |
parent | fdf0eaf11452d72945af31804e2a1048ee1b574c (diff) | |
download | linux-44f23dabdc08698b7a066300eb55db23895f5459.tar.xz |
nvdimm: 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>)
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/nvdimm/namespace_devs.c')
-rw-r--r-- | drivers/nvdimm/namespace_devs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index c60ec0b373c5..07177eadc56e 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -2,6 +2,7 @@ /* * Copyright(c) 2013-2015 Intel Corporation. All rights reserved. */ +#include <linux/kstrtox.h> #include <linux/module.h> #include <linux/device.h> #include <linux/sort.h> @@ -1338,7 +1339,7 @@ static ssize_t force_raw_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { bool force_raw; - int rc = strtobool(buf, &force_raw); + int rc = kstrtobool(buf, &force_raw); if (rc) return rc; |