From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guodong Xu Subject: [PATCH] regulator: mc13xxx: add missing of_node_get() Date: Tue, 9 Sep 2014 19:07:05 +0800 Message-ID: <1410260825-21667-1-git-send-email-guodong.xu@linaro.org> Return-path: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Guodong Xu List-Id: devicetree@vger.kernel.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. Signed-off-by: Guodong Xu --- 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html