mmc: sdhci: factor out sdhci_pre_dma_transfer() from sdhci_adma_table_pre()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 26 Jan 2016 13:40:22 +0000 (13:40 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 29 Feb 2016 10:03:20 +0000 (11:03 +0100)
commit60c647624a67f6057866b685ba20abce52e259e5
treecaa3db50045015105ce64ae32ebf5b9782ec67c8
parent48857d9b7865c4110ecf9c57b85224a3ec84ad54
mmc: sdhci: factor out sdhci_pre_dma_transfer() from sdhci_adma_table_pre()

In sdhci_prepare_data(), when SDHCI_REQ_USE_DMA is set, there are two
paths that prepare the data buffers for transfer.  One is when
SDHCI_USE_ADMA is set, and is located inside sdhci_adma_table_pre().
The other is when SDHCI_USE_ADMA is clear, in the else clause of the
above.

Factor out the call to sdhci_pre_dma_transfer() along with its error
checking.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c