ACPI: sysfs: Use kstrtobool() instead of strtobool()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 1 Nov 2022 21:13:57 +0000 (22:13 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Nov 2022 18:46:54 +0000 (19:46 +0100)
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/sysfs.c

index cc2fe06..2d81c74 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/bitmap.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/moduleparam.h>
 
 #include "internal.h"
@@ -992,7 +993,7 @@ static ssize_t force_remove_store(struct kobject *kobj,
        bool val;
        int ret;
 
-       ret = strtobool(buf, &val);
+       ret = kstrtobool(buf, &val);
        if (ret < 0)
                return ret;