Hello,

You are right, adding clock-names works for me and it seems to be a good 
way to work with the clocks. This patch is not nessesary for me anymore, it 
may be applied just for consistency with other timers, which are searchabe 
via devm_clk_get(NULL, clockname).

Best,
Alexander Bersenev, Institute of Mathematics and Mechanics

среда, 30 апреля 2014 г., 14:25:47 UTC+6 пользователь Александр Берсенев 
написал:
>
> This patch enables to use devm_clk_get function to get gate clocks by name.
>     
> Signed-off-by: Alexander Bersenev <[email protected]>
>
> diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
> index 31584ee..3617681 100644
> --- a/drivers/clk/sunxi/clk-sunxi.c
> +++ b/drivers/clk/sunxi/clk-sunxi.c
> @@ -1048,6 +1048,8 @@ static void __init sunxi_gates_clk_setup(struct 
> device_node *node,
>        reg + 4 * (i/32), i % 32,
>        0, &clk_lock);
>   WARN_ON(IS_ERR(clk_data->clks[i]));
> + if (!IS_ERR(clk_data->clks[i]))
> + clk_register_clkdev(clk_data->clks[i], clk_name, NULL);
>  
>   j++;
>   }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to