aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2012-08-03 23:12:09 +0200
committercodeworkx <daniel.hillenbrand@codeworkx.de>2012-08-03 23:12:09 +0200
commit52215890ef7c4d06fd3323f8315d85f14d637a91 (patch)
tree2f97aaab909de9fa903ba52224f6f643e2f25cf5 /drivers/mmc
parent4309a7ffa8aa46ac2fc4090cebc3efeb00dce72f (diff)
downloadkernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.zip
kernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.tar.gz
kernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.tar.bz2
samsung opensource update4
Change-Id: I9db25f213bb1577c4468873c66b230a0566b6cf2
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c4
-rw-r--r--drivers/mmc/host/sdhci.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 0b2b5b4..e33a805 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -268,8 +268,8 @@ static void mmc_wait_for_req_done(struct mmc_host *host,
wait_for_completion(&mrq->completion);
cmd = mrq->cmd;
- if (!cmd->error || !cmd->retries ||
- mmc_card_removed(host->card))
+
+ if (mmc_card_removed(host->card))
return;
/* if card is mmc type and nonremovable, and there are erros after
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9f23876..b876dcc 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -643,9 +643,14 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
/* timeout in us */
if (!data)
target_timeout = cmd->cmd_timeout_ms * 1000;
- else
- target_timeout = data->timeout_ns / 1000 +
- data->timeout_clks / host->clock;
+ else {
+ /* patch added for divide by zero once issue. */
+ if (host && host->clock)
+ target_timeout = data->timeout_ns / 1000 +
+ data->timeout_clks / host->clock;
+ else
+ return 0;
+ }
if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)
host->timeout_clk = host->clock / 1000;