]> git.baikalelectronics.ru Git - kernel.git/commit
clk: of: helper for filling parent clock array and return num of parents
authorDinh Nguyen <dinguyen@opensource.altera.com>
Fri, 5 Jun 2015 16:26:13 +0000 (11:26 -0500)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 6 Jun 2015 01:10:33 +0000 (18:10 -0700)
commitbf9f8e56de514fcc8e9d7ee9071d7befe70710ac
treea0fe78e4fdb27cc74aa3920a4c996ec2a3be700e
parentb58b947dfab2c92d8a41e39ae57fc20611d0428f
clk: of: helper for filling parent clock array and return num of parents

Sprinkled all through the platform clock drivers are code like this to
fill the clock parent array:

for (i = 0; i < num_parents; ++i)
parent_names[i] = of_clk_get_parent_name(np, i);

The of_clk_parent_fill() will do the same as the code above, and while
at it, return the number of parents as well since the logic of the
function is to the walk the clock node to look for the parent.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
[sboyd@codeaurora.org: Fixed kernel-doc]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c
include/linux/clk-provider.h