Commit a7b2b6cc authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Peng Fan
Browse files

mmc: add mmc_get_dma_dir() helper



Copied from Linux kernel.
include/linux/mmc/host.h
Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung's avatarJaehoon Chung <jh80.chung@samsung.com>
parent fdd84c8b
......@@ -12,6 +12,7 @@
#include <linux/list.h>
#include <linux/sizes.h>
#include <linux/compiler.h>
#include <linux/dma-direction.h>
#include <part.h>
#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
......@@ -880,4 +881,9 @@ int mmc_get_env_dev(void);
*/
struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
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;
}
#endif /* _MMC_H_ */
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