* [PATCH] regulator: mc13xxx: add missing of_node_get()
@ 2014-09-09 11:07 Guodong Xu
2014-09-09 11:11 ` Axel Lin
0 siblings, 1 reply; 3+ messages in thread
From: Guodong Xu @ 2014-09-09 11:07 UTC (permalink / raw)
To: broonie, lgirdwood, shawn.guo, axel.lin, linux-arm-kernel,
linux-kernel, devicetree
Cc: Guodong Xu
mc13xxx_parse_regulators_dt() goes through dt tree to search for regulator
sub-nodes. For each matched node, later on it will be used and registered
into a regulator_dev.
of_node_get() should be called to increase its refcount.
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
---
drivers/regulator/mc13xxx-regulator-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c
index afba024..ebc8ff1 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -195,7 +195,7 @@ struct mc13xxx_regulator_init_data *mc13xxx_parse_regulators_dt(
p->id = i;
p->init_data = of_get_regulator_init_data(
&pdev->dev, child);
- p->node = child;
+ p->node = of_node_get(child);
p++;
parsed++;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: mc13xxx: add missing of_node_get()
2014-09-09 11:07 [PATCH] regulator: mc13xxx: add missing of_node_get() Guodong Xu
@ 2014-09-09 11:11 ` Axel Lin
2014-09-09 11:22 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2014-09-09 11:11 UTC (permalink / raw)
To: Guodong Xu
Cc: Mark Brown, Liam Girdwood, Shawn Guo, linux-arm-kernel,
linux-kernel, devicetree
2014-09-09 19:07 GMT+08:00 Guodong Xu <guodong.xu@linaro.org>:
> mc13xxx_parse_regulators_dt() goes through dt tree to search for regulator
> sub-nodes. For each matched node, later on it will be used and registered
> into a regulator_dev.
>
> of_node_get() should be called to increase its refcount.
I think it's done by regulator core:
commit 63c7c9e16c8e92cc069854f2babdf82d2d38e4c7
regulator: core: Get and put regulator of_node
Regards,
Axel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: mc13xxx: add missing of_node_get()
2014-09-09 11:11 ` Axel Lin
@ 2014-09-09 11:22 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-09-09 11:22 UTC (permalink / raw)
To: Axel Lin
Cc: Guodong Xu, Liam Girdwood, Shawn Guo, linux-arm-kernel,
linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
On Tue, Sep 09, 2014 at 07:11:46PM +0800, Axel Lin wrote:
> 2014-09-09 19:07 GMT+08:00 Guodong Xu <guodong.xu@linaro.org>:
> > mc13xxx_parse_regulators_dt() goes through dt tree to search for regulator
> > sub-nodes. For each matched node, later on it will be used and registered
> > into a regulator_dev.
> >
> > of_node_get() should be called to increase its refcount.
> I think it's done by regulator core:
> commit 63c7c9e16c8e92cc069854f2babdf82d2d38e4c7
> regulator: core: Get and put regulator of_node
Yes, that's the idea anyway. It's possible this is buggy though.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-09 11:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 11:07 [PATCH] regulator: mc13xxx: add missing of_node_get() Guodong Xu
2014-09-09 11:11 ` Axel Lin
2014-09-09 11:22 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).