Skip to content

Commit

Permalink
mmc: check for > 1 clk_requests when disabling gating
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Walleij authored and Chris Ball committed Jan 9, 2011
1 parent 253e0a7 commit c288b85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mmc/core/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ static inline void mmc_host_clk_exit(struct mmc_host *host)
mmc_host_clk_gate_delayed(host);
if (host->clk_gated)
mmc_host_clk_ungate(host);
BUG_ON(host->clk_requests > 0);
/* There should be only one user now */
WARN_ON(host->clk_requests > 1);
}

#else
Expand Down

0 comments on commit c288b85

Please sign in to comment.