From: Adrian Hunter Date: Thu, 23 Jun 2011 10:40:27 +0000 (+0300) Subject: mmc: core: make erase timeout calculation allow for gated clock X-Git-Tag: v3.0-rc5~23^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cf8c6dd2e261da94b87c4deadcc136ab022b6ac;p=platform%2Fkernel%2Flinux-3.10.git mmc: core: make erase timeout calculation allow for gated clock The erase timeout calculation may depend on clock rate which is zero if the clock is gated, so use mmc_host_clk_rate() which allows for that case. Signed-off-by: Adrian Hunter Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 68091dd..7843efe 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1245,7 +1245,7 @@ static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card, */ timeout_clks <<= 1; timeout_us += (timeout_clks * 1000) / - (card->host->ios.clock / 1000); + (mmc_host_clk_rate(card->host) / 1000); erase_timeout = timeout_us / 1000;