XenevaOS
Loading...
Searching...
No Matches
dma-direction.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_DMA_DIRECTION_H
3#define _LINUX_DMA_DIRECTION_H
4
5/*
6 * DCL <linux/dma-direction.h> -- the direction enum, and nothing else.
7 *
8 * mainline keeps it here so dma-mapping.h, dma-buf.h and the sg_table users
9 * can share one name. DCL's copy existed nowhere: every prototype that took
10 * `enum dma_data_direction` had the tag first mentioned inside its own
11 * parameter list, which C scopes to that declaration -- so dma-buf.h:579's
12 * declaration and the definition in DCL/drm_stubs.c were two different types
13 * with the same spelling, and clang said "conflicting types" rather than
14 * "you forgot a header". Pulling the enum into file scope fixes the pair and
15 * every later declaration at once.
16 *
17 * The values are mainline's: the direction is also the argument DCL's
18 * stubs ignore, but a caller that passes DMA_FROM_DEVICE into an sg_table
19 * walk should not have it become 4.
20 */
27
28#endif /* _LINUX_DMA_DIRECTION_H */
dma_data_direction
Definition dma-direction.h:21
@ DMA_NONE
Definition dma-direction.h:25
@ DMA_TO_DEVICE
Definition dma-direction.h:23
@ DMA_FROM_DEVICE
Definition dma-direction.h:24
@ DMA_BIDIRECTIONAL
Definition dma-direction.h:22