From: Heiner Kallweit Date: Sun, 26 Mar 2017 18:41:32 +0000 (+0200) Subject: mmc: core: add mmc_get_dma_dir X-Git-Tag: MMI-PSA29.97-13-9~5713^2~69 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6335d68349a85382cc55a5260d5bfda85f8e24a8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mmc: core: add mmc_get_dma_dir Add function for determining DMA direction to core. Signed-off-by: Heiner Kallweit Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson --- diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 83f1c4a9f03b..21385ac0c9b1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -17,6 +17,7 @@ #include #include #include +#include struct mmc_ios { unsigned int clock; /* clock rate */ @@ -499,6 +500,11 @@ static inline bool mmc_can_retune(struct mmc_host *host) return host->can_retune == 1; } +static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data) +{ + return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE; +} + int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); int mmc_abort_tuning(struct mmc_host *host, u32 opcode);