lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] soc: rockchip: power-domain: use clk_bulk APIs
Date
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 <jeffy.chen@rock-chips.com>

[...]

> - 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

\
 
 \ /
  Last update: 2018-03-02 16:44    [W:2.774 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site