regulator: gpio: replace !strcmp with sysfs_streq
PATCH 1/1 regulator: gpio: replace !strcmp with sysfs_streq
From: ye xingchen <[email protected]>
Replace the open-code with sysfs_streq().
Signed-off-by ye xingchen <[email protected]>
--- drivers/regulator/gpio-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/gpio-regulator.c +2 -2
@@ -211,9 +211,9 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, config->type =REGULATOR_VOLTAGE ; ret =of_property_read_string (np,"regulator-type" , ®type);if (ret >=0 ) { -if (!strncmp ("voltage" , regtype,7 )) +if (sysfs_streq (regtype,"voltage" )) config->type =REGULATOR_VOLTAGE ; -else if (!strncmp ("current" , regtype,7 )) +else if (sysfs_streq (regtype,"current" )) config->type =REGULATOR_CURRENT ;else dev_warn(dev, "Unknown regulator-type '%s'\n",
Signature · 1 line
2.25.1