110be98a7SChris Wilson /* 210be98a7SChris Wilson * SPDX-License-Identifier: MIT 310be98a7SChris Wilson * 410be98a7SChris Wilson * Copyright © 2016 Intel Corporation 510be98a7SChris Wilson */ 610be98a7SChris Wilson 710be98a7SChris Wilson #ifndef __MOCK_DMABUF_H__ 810be98a7SChris Wilson #define __MOCK_DMABUF_H__ 910be98a7SChris Wilson 1010be98a7SChris Wilson #include <linux/dma-buf.h> 1110be98a7SChris Wilson 1210be98a7SChris Wilson struct mock_dmabuf { 1310be98a7SChris Wilson int npages; 1410be98a7SChris Wilson struct page *pages[]; 1510be98a7SChris Wilson }; 1610be98a7SChris Wilson to_mock(struct dma_buf * buf)17*080f1288SMasahiro Yamadastatic inline struct mock_dmabuf *to_mock(struct dma_buf *buf) 1810be98a7SChris Wilson { 1910be98a7SChris Wilson return buf->priv; 2010be98a7SChris Wilson } 2110be98a7SChris Wilson 2210be98a7SChris Wilson #endif /* !__MOCK_DMABUF_H__ */ 23