2010/12/22 David Vrabel <[email protected]>:

> [Me]
>> It should be BUG_ON(host->clk_requests > 1)
>
> Change to a WARN_ON() perhaps?

Sure! Chris do you prefer this one instead?

From: Linus Walleij <[email protected]>
Date: Wed, 22 Dec 2010 09:49:04 +0100
Subject: [PATCH] mmc: check for > 1 clk_requests

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 <[email protected]>
---
 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 92e3370..b3ac6c5 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
-- 
1.7.3.3

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to