diff options
author | Linus Walleij <linus.ml.walleij@gmail.com> | 2010-12-22 03:50:12 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-01-08 23:52:22 -0500 |
commit | c288b85554097a3d1271f935c48b442280b2db9e (patch) | |
tree | 1ae03edf8864c2d5260d2cc875317bbecc1673c2 /drivers/mmc | |
parent | 253e0a7c3dc4bbbc69fc6bfd7c01bc4c9397a5e5 (diff) |
mmc: check for > 1 clk_requests when disabling gating
Since we make sure the clock is enabled in the mmc_host_clk_exit()
function we should expect a reference counter of 1, not 0.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Tested-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/host.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 92e33703e437..b3ac6c5bc5c6 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -235,7 +235,8 @@ static inline void mmc_host_clk_exit(struct mmc_host *host) | |||
235 | mmc_host_clk_gate_delayed(host); | 235 | mmc_host_clk_gate_delayed(host); |
236 | if (host->clk_gated) | 236 | if (host->clk_gated) |
237 | mmc_host_clk_ungate(host); | 237 | mmc_host_clk_ungate(host); |
238 | BUG_ON(host->clk_requests > 0); | 238 | /* There should be only one user now */ |
239 | WARN_ON(host->clk_requests > 1); | ||
239 | } | 240 | } |
240 | 241 | ||
241 | #else | 242 | #else |