mmc: sdhci: move initialisation of command error member
[deliverable/linux.git] / drivers / mmc / host / sdhci.c
index add9fdfd1d8feff619f70d58d581b877a668a88c..43d87179c2704aa1e55466e320d73ce119188342 100644 (file)
@@ -1003,6 +1003,9 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
 
        WARN_ON(host->cmd);
 
+       /* Initially, a command has no error */
+       cmd->error = 0;
+
        /* Wait max 10 ms */
        timeout = 10;
 
@@ -1097,8 +1100,6 @@ static void sdhci_finish_command(struct sdhci_host *host)
                }
        }
 
-       host->cmd->error = 0;
-
        /* Finished CMD23, now send actual command. */
        if (host->cmd == host->mrq->sbc) {
                host->cmd = NULL;
@@ -2928,7 +2929,7 @@ int sdhci_add_host(struct sdhci_host *host)
         * SDHCI_QUIRK2_BROKEN_64_BIT_DMA must be left to the drivers to
         * implement.
         */
-       if (sdhci_readl(host, SDHCI_CAPABILITIES) & SDHCI_CAN_64BIT)
+       if (caps[0] & SDHCI_CAN_64BIT)
                host->flags |= SDHCI_USE_64_BIT_DMA;
 
        if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
This page took 0.046819 seconds and 5 git commands to generate.