From: Christophe JAILLET Date: Tue, 1 Nov 2022 21:14:02 +0000 (+0100) Subject: powercap: Use kstrtobool() instead of strtobool() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7ac70300f386a5f7d00f66ccc46ed30576b68ef4;p=linux.git powercap: 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 () Signed-off-by: Christophe JAILLET Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index f0654a932b372..1f968353d4799 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -446,7 +447,7 @@ static ssize_t enabled_store(struct device *dev, { bool mode; - if (strtobool(buf, &mode)) + if (kstrtobool(buf, &mode)) return -EINVAL; if (dev->parent) { struct powercap_zone *power_zone = to_powercap_zone(dev);