From: Dong Aisheng Date: Wed, 12 Apr 2017 01:58:44 +0000 (+0800) Subject: regulator: anatop: use of_property_read_string to read the name X-Git-Tag: v4.12-rc1~111^2~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5062e04711dbc4f67b24ffd926cc67060267792d;p=thirdparty%2Fkernel%2Flinux.git regulator: anatop: use of_property_read_string to read the name sreg->name is a string, so use a more proper api to read back the string instead of of_get_property. Signed-off-by: Dong Aisheng Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index aa93f462ac6ea..58141cbdf257a 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -193,7 +193,8 @@ static int anatop_regulator_probe(struct platform_device *pdev) sreg = devm_kzalloc(dev, sizeof(*sreg), GFP_KERNEL); if (!sreg) return -ENOMEM; - sreg->name = of_get_property(np, "regulator-name", NULL); + + of_property_read_string(np, "regulator-name", &sreg->name); rdesc = &sreg->rdesc; rdesc->name = sreg->name; rdesc->type = REGULATOR_VOLTAGE;