diff options
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 9955ad7e786..251e45d6024 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -219,8 +219,17 @@ static void clk_disable_unused_subtree(struct clk *clk) | |||
219 | if (clk->flags & CLK_IGNORE_UNUSED) | 219 | if (clk->flags & CLK_IGNORE_UNUSED) |
220 | goto unlock_out; | 220 | goto unlock_out; |
221 | 221 | ||
222 | if (__clk_is_enabled(clk) && clk->ops->disable) | 222 | /* |
223 | clk->ops->disable(clk->hw); | 223 | * some gate clocks have special needs during the disable-unused |
224 | * sequence. call .disable_unused if available, otherwise fall | ||
225 | * back to .disable | ||
226 | */ | ||
227 | if (__clk_is_enabled(clk)) { | ||
228 | if (clk->ops->disable_unused) | ||
229 | clk->ops->disable_unused(clk->hw); | ||
230 | else if (clk->ops->disable) | ||
231 | clk->ops->disable(clk->hw); | ||
232 | } | ||
224 | 233 | ||
225 | unlock_out: | 234 | unlock_out: |
226 | spin_unlock_irqrestore(&enable_lock, flags); | 235 | spin_unlock_irqrestore(&enable_lock, flags); |