* [PATCH -next] firmware: qcom: scm: Use devm_reset_controller_register()
@ 2016-08-28 16:29 Wei Yongjun
2016-10-24 21:37 ` Andy Gross
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-28 16:29 UTC (permalink / raw)
To: Andy Gross, David Brown, Bjorn Andersson
Cc: Wei Yongjun, linux-arm-msm, linux-soc
From: Wei Yongjun <weiyongjun1@huawei.com>
Use devm_reset_controller_register() for the reset controller
registration and fixes the memory leak when unload the module.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/firmware/qcom_scm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index d95c702..9bf66ae 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -356,7 +356,9 @@ static int qcom_scm_probe(struct platform_device *pdev)
scm->reset.ops = &qcom_scm_pas_reset_ops;
scm->reset.nr_resets = 1;
scm->reset.of_node = pdev->dev.of_node;
- reset_controller_register(&scm->reset);
+ ret = devm_reset_controller_register(&pdev->dev, &scm->reset);
+ if (ret)
+ return ret;
/* vote for max clk rate for highest performance */
ret = clk_set_rate(scm->core_clk, INT_MAX);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] firmware: qcom: scm: Use devm_reset_controller_register()
2016-08-28 16:29 [PATCH -next] firmware: qcom: scm: Use devm_reset_controller_register() Wei Yongjun
@ 2016-10-24 21:37 ` Andy Gross
0 siblings, 0 replies; 2+ messages in thread
From: Andy Gross @ 2016-10-24 21:37 UTC (permalink / raw)
To: Wei Yongjun
Cc: David Brown, Bjorn Andersson, Wei Yongjun, linux-arm-msm,
linux-soc
On Sun, Aug 28, 2016 at 04:29:10PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Use devm_reset_controller_register() for the reset controller
> registration and fixes the memory leak when unload the module.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
Thanks for the patch. I queued it up.
Andy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-24 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-28 16:29 [PATCH -next] firmware: qcom: scm: Use devm_reset_controller_register() Wei Yongjun
2016-10-24 21:37 ` Andy Gross
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).