diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-08-03 23:12:09 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-08-03 23:12:09 +0200 |
commit | 52215890ef7c4d06fd3323f8315d85f14d637a91 (patch) | |
tree | 2f97aaab909de9fa903ba52224f6f643e2f25cf5 /drivers/mmc/host | |
parent | 4309a7ffa8aa46ac2fc4090cebc3efeb00dce72f (diff) | |
download | kernel_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/host')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 11 |
1 files changed, 8 insertions, 3 deletions
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; |