mmc: sdhci: move initialisation of command error member
[deliverable/linux.git] / drivers / mmc / host / sdhci.c
index 9bfa66df963aee8bb127362aea15ff3b27349de2..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;
@@ -1360,7 +1361,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
        sdhci_runtime_pm_get(host);
 
        /* Firstly check card presence */
-       present = sdhci_do_get_cd(host);
+       present = mmc->ops->get_cd(mmc);
 
        spin_lock_irqsave(&host->lock, flags);
 
@@ -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.025299 seconds and 5 git commands to generate.