summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/jz4740_mmc.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-03-26 21:45:56 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 22:41:52 +0300
commitfeeef096a770d288c943c1759785bd9d4f9247b7 (patch)
treeb399ffbec66a47e5f0a11e8e2fba90f63b286edc /drivers/mmc/host/jz4740_mmc.c
parent6335d68349a85382cc55a5260d5bfda85f8e24a8 (diff)
downloadlinux-feeef096a770d288c943c1759785bd9d4f9247b7.tar.xz
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/jz4740_mmc.c')
-rw-r--r--drivers/mmc/host/jz4740_mmc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 819ad32964fc..57e254aac48d 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -200,11 +200,6 @@ free_master_write:
return -ENODEV;
}
-static inline int jz4740_mmc_get_dma_dir(struct mmc_data *data)
-{
- return (data->flags & MMC_DATA_READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
-}
-
static inline struct dma_chan *jz4740_mmc_get_dma_chan(struct jz4740_mmc_host *host,
struct mmc_data *data)
{
@@ -215,7 +210,7 @@ static void jz4740_mmc_dma_unmap(struct jz4740_mmc_host *host,
struct mmc_data *data)
{
struct dma_chan *chan = jz4740_mmc_get_dma_chan(host, data);
- enum dma_data_direction dir = jz4740_mmc_get_dma_dir(data);
+ enum dma_data_direction dir = mmc_get_dma_dir(data);
dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, dir);
}
@@ -227,7 +222,7 @@ static int jz4740_mmc_prepare_dma_data(struct jz4740_mmc_host *host,
struct dma_chan *chan)
{
struct jz4740_mmc_host_next *next_data = &host->next_data;
- enum dma_data_direction dir = jz4740_mmc_get_dma_dir(data);
+ enum dma_data_direction dir = mmc_get_dma_dir(data);
int sg_len;
if (!next && data->host_cookie &&