That is unecessary here and creates an unwanted dependency to the PCI subsystem.
Use forward declare in dma-buf-mapping.h instead. v2: switch to forward declare Signed-off-by: Christian König <[email protected]> --- include/linux/dma-buf-mapping.h | 2 ++ include/linux/dma-buf.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/dma-buf-mapping.h b/include/linux/dma-buf-mapping.h index 09bde3f748e4..64c03608cce7 100644 --- a/include/linux/dma-buf-mapping.h +++ b/include/linux/dma-buf-mapping.h @@ -7,6 +7,8 @@ #define __DMA_BUF_MAPPING_H__ #include <linux/dma-buf.h> +struct p2pdma_provider; + struct sg_table *dma_buf_phys_vec_to_sgt(struct dma_buf_attachment *attach, struct p2pdma_provider *provider, struct phys_vec *phys_vec, diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index d15b2b31d3c9..159271fcf3d2 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -22,7 +22,6 @@ #include <linux/fs.h> #include <linux/dma-fence.h> #include <linux/wait.h> -#include <linux/pci-p2pdma.h> struct device; struct dma_buf; -- 2.43.0
