mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 08:43:31 +00:00
s390/ipl: 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>) Link: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
parent
254b2fd02e
commit
d9b25bdf57
1 changed files with 4 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/kstrtox.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/ctype.h>
|
||||
|
@ -779,7 +780,7 @@ static ssize_t reipl_fcp_clear_store(struct kobject *kobj,
|
|||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
if (strtobool(buf, &reipl_fcp_clear) < 0)
|
||||
if (kstrtobool(buf, &reipl_fcp_clear) < 0)
|
||||
return -EINVAL;
|
||||
return len;
|
||||
}
|
||||
|
@ -899,7 +900,7 @@ static ssize_t reipl_nvme_clear_store(struct kobject *kobj,
|
|||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
if (strtobool(buf, &reipl_nvme_clear) < 0)
|
||||
if (kstrtobool(buf, &reipl_nvme_clear) < 0)
|
||||
return -EINVAL;
|
||||
return len;
|
||||
}
|
||||
|
@ -952,7 +953,7 @@ static ssize_t reipl_ccw_clear_store(struct kobject *kobj,
|
|||
struct kobj_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
if (strtobool(buf, &reipl_ccw_clear) < 0)
|
||||
if (kstrtobool(buf, &reipl_ccw_clear) < 0)
|
||||
return -EINVAL;
|
||||
return len;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue