summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index c0141f3e1109..253792a46c08 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -352,9 +352,12 @@ static void clk_unprepare_unused_subtree(struct clk *clk)
if (clk->flags & CLK_IGNORE_UNUSED)
return;
- if (__clk_is_prepared(clk))
- if (clk->ops->unprepare)
+ if (__clk_is_prepared(clk)) {
+ if (clk->ops->unprepare_unused)
+ clk->ops->unprepare_unused(clk->hw);
+ else if (clk->ops->unprepare)
clk->ops->unprepare(clk->hw);
+ }
}
/* caller must hold prepare_lock */