From: Linus Walleij Date: Wed, 22 Dec 2010 08:50:12 +0000 (+0100) Subject: mmc: check for > 1 clk_requests when disabling gating X-Git-Tag: v2.6.38-rc1~418^2~20 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=c288b85554097a3d1271f935c48b442280b2db9e;p=~andy%2Flinux 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 Tested-by: Chris Ball Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 92e33703e43..b3ac6c5bc5c 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) 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