mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
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 <aisheng.dong@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7f51cf2ea7
commit
5062e04711
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user