Commit fce14421 authored by Russell King's avatar Russell King Committed by Ulf Hansson

mmc: sdhci: further code simplication

Further simplify the code in sdhci_prepare_data() - we don't set
SDHCI_REQ_USE_DMA anywhere else in the driver, so there is no
need to set it, and then immediately test it.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Tested-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent df953925
...@@ -725,7 +725,11 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) ...@@ -725,7 +725,11 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
host->data_early = 0; host->data_early = 0;
host->data->bytes_xfered = 0; host->data->bytes_xfered = 0;
if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
struct scatterlist *sg;
unsigned int length_mask, offset_mask;
int i;
host->flags |= SDHCI_REQ_USE_DMA; host->flags |= SDHCI_REQ_USE_DMA;
/* /*
...@@ -735,11 +739,6 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) ...@@ -735,11 +739,6 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
* The assumption here being that alignment and lengths are * The assumption here being that alignment and lengths are
* the same after DMA mapping to device address space. * the same after DMA mapping to device address space.
*/ */
if (host->flags & SDHCI_REQ_USE_DMA) {
struct scatterlist *sg;
unsigned int length_mask, offset_mask;
int i;
length_mask = 0; length_mask = 0;
offset_mask = 0; offset_mask = 0;
if (host->flags & SDHCI_USE_ADMA) { if (host->flags & SDHCI_USE_ADMA) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment