mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
PCI: Unify PCI and normal DMA direction definitions
Current DMA direction definitions in pci-dma-compat.h and dma-direction.h are mirrored in value. Unify them to enhance readability and avoid possible inconsistency. Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Joey Zheng <yu.zheng@hxt-semitech.com>
This commit is contained in:
parent
f7368a5502
commit
546c596cf5
2 changed files with 6 additions and 8 deletions
|
@ -1,14 +1,12 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
#ifndef _LINUX_DMA_DIRECTION_H
|
#ifndef _LINUX_DMA_DIRECTION_H
|
||||||
#define _LINUX_DMA_DIRECTION_H
|
#define _LINUX_DMA_DIRECTION_H
|
||||||
/*
|
|
||||||
* These definitions mirror those in pci.h, so they can be used
|
|
||||||
* interchangeably with their PCI_ counterparts.
|
|
||||||
*/
|
|
||||||
enum dma_data_direction {
|
enum dma_data_direction {
|
||||||
DMA_BIDIRECTIONAL = 0,
|
DMA_BIDIRECTIONAL = 0,
|
||||||
DMA_TO_DEVICE = 1,
|
DMA_TO_DEVICE = 1,
|
||||||
DMA_FROM_DEVICE = 2,
|
DMA_FROM_DEVICE = 2,
|
||||||
DMA_NONE = 3,
|
DMA_NONE = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
|
||||||
/* This defines the direction arg to the DMA mapping routines. */
|
/* This defines the direction arg to the DMA mapping routines. */
|
||||||
#define PCI_DMA_BIDIRECTIONAL 0
|
#define PCI_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL
|
||||||
#define PCI_DMA_TODEVICE 1
|
#define PCI_DMA_TODEVICE DMA_TO_DEVICE
|
||||||
#define PCI_DMA_FROMDEVICE 2
|
#define PCI_DMA_FROMDEVICE DMA_FROM_DEVICE
|
||||||
#define PCI_DMA_NONE 3
|
#define PCI_DMA_NONE DMA_NONE
|
||||||
|
|
||||||
static inline void *
|
static inline void *
|
||||||
pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
|
pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue