Skip to content

Commit

Permalink
clk: drop the initial core->parents look-ups from __clk_core_init()
Browse files Browse the repository at this point in the history
The core->parents is a cache to save expensive clock parent look-ups.
It will be filled as needed later.  We do not have to do it here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Masahiro Yamada authored and Stephen Boyd committed Feb 2, 2016
1 parent 88cfbef commit 3c436bf
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2347,17 +2347,6 @@ static int __clk_core_init(struct clk_core *core)
"%s: invalid NULL in %s's .parent_names\n",
__func__, core->name);

/*
* clk_core_lookup returns NULL for parents that have not been
* clk_init'd; thus any access to clk->parents[] must check
* for a NULL pointer. We can always perform lazy lookups for
* missing parents later on.
*/
if (core->parents)
for (i = 0; i < core->num_parents; i++)
core->parents[i] =
clk_core_lookup(core->parent_names[i]);

core->parent = __clk_init_parent(core);

/*
Expand Down

0 comments on commit 3c436bf

Please sign in to comment.