Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5062e047 authored by Dong Aisheng's avatar Dong Aisheng Committed by Mark Brown
Browse files

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: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7f51cf2e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;