summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-06-29 16:24:24 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-07-25 10:34:38 +0200
commitea96802384cd062361f758f711c22010238d47f3 (patch)
tree8c2141896cf40f7389b7c63b0c201c16a85ac49c /drivers/mmc/host/sdhci.c
parent7c89a3d9082c316f898ec2c3c6c1689e0cad6117 (diff)
downloadop-kernel-dev-ea96802384cd062361f758f711c22010238d47f3.zip
op-kernel-dev-ea96802384cd062361f758f711c22010238d47f3.tar.gz
mmc: sdhci: Get rid of host->busy_handle
Now that there is host->data_cmd to record the command for which a data interrupt is expected, it is possible to determine whether a command with busy signaling has completed without an extra flag. So host->busy_handle is not needed. Remove it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c9456bd..1f2c4a7 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1014,7 +1014,6 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
mod_timer(&host->timer, timeout);
host->cmd = cmd;
- host->busy_handle = 0;
if (cmd->data || cmd->flags & MMC_RSP_BUSY) {
WARN_ON(host->data_cmd);
host->data_cmd = cmd;
@@ -1094,9 +1093,8 @@ static void sdhci_finish_command(struct sdhci_host *host)
if (cmd->data) {
DBG("Cannot wait for busy signal when also doing a data transfer");
} else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ) &&
- !host->busy_handle) {
- /* Mark that command complete before busy is ended */
- host->busy_handle = 1;
+ cmd == host->data_cmd) {
+ /* Command complete before busy is ended */
return;
}
}
@@ -2393,10 +2391,10 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
* before the command completed, so make
* sure we do things in the proper order.
*/
- if (host->busy_handle)
- tasklet_schedule(&host->finish_tasklet);
- else
- host->busy_handle = 1;
+ if (host->cmd == data_cmd)
+ return;
+
+ tasklet_schedule(&host->finish_tasklet);
return;
}
}
OpenPOWER on IntegriCloud