mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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 (<linux/kstrtox.h>) Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
b55eef5226
commit
7ac70300f3
@ -7,6 +7,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/powercap.h>
|
||||
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user