Home | History | Annotate | Line # | Download | only in selftests
      1 /*	$NetBSD: mock_dmabuf.h,v 1.2 2021/12/18 23:45:30 riastradh Exp $	*/
      2 
      3 /*
      4  * SPDX-License-Identifier: MIT
      5  *
      6  * Copyright  2016 Intel Corporation
      7  */
      8 
      9 #ifndef __MOCK_DMABUF_H__
     10 #define __MOCK_DMABUF_H__
     11 
     12 #include <linux/dma-buf.h>
     13 
     14 struct mock_dmabuf {
     15 	int npages;
     16 	struct page *pages[];
     17 };
     18 
     19 static inline struct mock_dmabuf *to_mock(struct dma_buf *buf)
     20 {
     21 	return buf->priv;
     22 }
     23 
     24 #endif /* !__MOCK_DMABUF_H__ */
     25