mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
![Christoph Hellwig](/assets/img/avatar_default.png)
Move the valid_dma_direction helper to a more suitable header, and clean it up to use the proper enum as well as removing pointless braces. Signed-off-by: Christoph Hellwig <hch@lst.de>
18 lines
407 B
C
18 lines
407 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_DMA_DIRECTION_H
|
|
#define _LINUX_DMA_DIRECTION_H
|
|
|
|
enum dma_data_direction {
|
|
DMA_BIDIRECTIONAL = 0,
|
|
DMA_TO_DEVICE = 1,
|
|
DMA_FROM_DEVICE = 2,
|
|
DMA_NONE = 3,
|
|
};
|
|
|
|
static inline int valid_dma_direction(enum dma_data_direction dir)
|
|
{
|
|
return dir == DMA_BIDIRECTIONAL || dir == DMA_TO_DEVICE ||
|
|
dir == DMA_FROM_DEVICE;
|
|
}
|
|
|
|
#endif /* _LINUX_DMA_DIRECTION_H */
|