projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f51cf2
)
regulator: anatop: use of_property_read_string to read the name
author
Dong Aisheng
<aisheng.dong@nxp.com>
Wed, 12 Apr 2017 01:58:44 +0000
(09:58 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 11 Apr 2017 20:35:58 +0000
(21:35 +0100)
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>
drivers/regulator/anatop-regulator.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/anatop-regulator.c
b/drivers/regulator/anatop-regulator.c
index aa93f462ac6eadae9f612472370c5c89e26a0eab..58141cbdf257a23ea2f1048395b599878ac03c60 100644
(file)
--- 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;