[PATCH] soc: rockchip: power-domain: use clk_bulk APIs

From
Heiko Stuebner <heiko@sntech.de>
Date
2018-03-02 15:43:30
Also in
linux-rockchip, lkml
Reply to
Jeffy Chen, 2018-02-28
Hi Jeffy,

Am Mittwoch, 28. Februar 2018, 13:41:43 CET schrieb Jeffy Chen:
Use clk_bulk APIs, and also add error handling for clk enable.

Signed-off-by: Jeffy Chen <redacted>
[...]
quoted hunk ↗ jump to hunk
-	for (i = 0; i < clk_cnt; i++) {
-		clk = of_clk_get(node, i);
-		if (IS_ERR(clk)) {
-			error = PTR_ERR(clk);
+	pd->num_clks = of_count_phandle_with_args(node, "clocks",
+						  "#clock-cells");
+
+	pd->clks = devm_kzalloc(pmu->dev, pd->num_clks * sizeof(pd->clks[0]),
applied for 4.17, after changing to devm_kcalloc like below:

pd->clks = devm_kcalloc(pmu->dev, pd->num_clks, sizeof(*pd->clks),


Thanks
Heiko
Thread (2 messages) 2 messages, 2 authors, last reply 2018-03-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help