diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-03-26 20:45:56 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-04-24 21:41:52 +0200 |
commit | feeef096a770d288c943c1759785bd9d4f9247b7 (patch) | |
tree | b399ffbec66a47e5f0a11e8e2fba90f63b286edc /drivers/mmc/host/mtk-sd.c | |
parent | mmc: core: add mmc_get_dma_dir (diff) | |
download | linux-feeef096a770d288c943c1759785bd9d4f9247b7.tar.xz linux-feeef096a770d288c943c1759785bd9d4f9247b7.zip |
mmc: use new core function mmc_get_dma_dir
Use new core function mmc_get_dma_dir().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mtk-sd.c')
-rw-r--r-- | drivers/mmc/host/mtk-sd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 0789d58e803c..5c1e178fc5f9 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -474,11 +474,9 @@ static void msdc_prepare_data(struct msdc_host *host, struct mmc_request *mrq) struct mmc_data *data = mrq->data; if (!(data->host_cookie & MSDC_PREPARE_FLAG)) { - bool read = (data->flags & MMC_DATA_READ) != 0; - data->host_cookie |= MSDC_PREPARE_FLAG; data->sg_count = dma_map_sg(host->dev, data->sg, data->sg_len, - read ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + mmc_get_dma_dir(data)); } } @@ -490,10 +488,8 @@ static void msdc_unprepare_data(struct msdc_host *host, struct mmc_request *mrq) return; if (data->host_cookie & MSDC_PREPARE_FLAG) { - bool read = (data->flags & MMC_DATA_READ) != 0; - dma_unmap_sg(host->dev, data->sg, data->sg_len, - read ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + mmc_get_dma_dir(data)); data->host_cookie &= ~MSDC_PREPARE_FLAG; } } |