diff options
author | Dong Aisheng <aisheng.dong@freescale.com> | 2015-07-28 21:19:41 +0800 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-08-24 16:49:13 -0700 |
commit | c660b2ebb25be5668a4ed333539f34b05841e17a (patch) | |
tree | f5e93c26009e6d948203cad4e638b16ca0319d42 /drivers/clk | |
parent | 836ee0f7d95c3feb742bd4b3a02fea3fe75bdef3 (diff) | |
download | op-kernel-dev-c660b2ebb25be5668a4ed333539f34b05841e17a.zip op-kernel-dev-c660b2ebb25be5668a4ed333539f34b05841e17a.tar.gz |
clk: remove duplicated code with __clk_set_parent_after
__clk_set_parent_after() actually used the second argument then we
could put this duplicate logic in there and call it with a different
order of arguments in the success vs. error paths in this function.
Cc: Mike Turquette <mturquette@linaro.org>
Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8e6688d..43e2c3a 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1208,14 +1208,8 @@ static int __clk_set_parent(struct clk_core *core, struct clk_core *parent, flags = clk_enable_lock(); clk_reparent(core, old_parent); clk_enable_unlock(flags); + __clk_set_parent_after(core, old_parent, parent); - if (core->prepare_count) { - flags = clk_enable_lock(); - clk_core_disable(core); - clk_core_disable(parent); - clk_enable_unlock(flags); - clk_core_unprepare(parent); - } return ret; } |