diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2014-12-22 14:26:42 -0500 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-01-20 13:09:06 -0500 |
commit | 4526e7b857076ba613cc7199fc7fd17d60e86ede (patch) | |
tree | 27f95def261db038ad9ece4cd62b52ac3b4e2854 /drivers/clk/clk.c | |
parent | 2e9dcdae4068460c45a308dd891be5248260251c (diff) |
clk: Skip fetching index for single parent clocks
We don't need to fetch the parent index for clocks if they only
have one parent. Doing this also avoid an unnecessary allocation
for the parent cache.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d48ac71c6c8b..7f25aaf2a2b0 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -1390,7 +1390,7 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate) | |||
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | /* try finding the new parent index */ | 1392 | /* try finding the new parent index */ |
1393 | if (parent) { | 1393 | if (parent && clk->num_parents > 1) { |
1394 | p_index = clk_fetch_parent_index(clk, parent); | 1394 | p_index = clk_fetch_parent_index(clk, parent); |
1395 | if (p_index < 0) { | 1395 | if (p_index < 0) { |
1396 | pr_debug("%s: clk %s can not be parent of clk %s\n", | 1396 | pr_debug("%s: clk %s can not be parent of clk %s\n", |