1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * DMA-BUF sysfs statistics. 4 * 5 * Copyright (C) 2021 Google LLC. 6 */ 7 8 #ifndef _DMA_BUF_SYSFS_STATS_H 9 #define _DMA_BUF_SYSFS_STATS_H 10 11 #ifdef CONFIG_DMABUF_SYSFS_STATS 12 13 int dma_buf_init_sysfs_statistics(void); 14 void dma_buf_uninit_sysfs_statistics(void); 15 16 int dma_buf_stats_setup(struct dma_buf *dmabuf); 17 18 void dma_buf_stats_teardown(struct dma_buf *dmabuf); 19 #else 20 dma_buf_init_sysfs_statistics(void)21static inline int dma_buf_init_sysfs_statistics(void) 22 { 23 return 0; 24 } 25 dma_buf_uninit_sysfs_statistics(void)26static inline void dma_buf_uninit_sysfs_statistics(void) {} 27 dma_buf_stats_setup(struct dma_buf * dmabuf)28static inline int dma_buf_stats_setup(struct dma_buf *dmabuf) 29 { 30 return 0; 31 } 32 dma_buf_stats_teardown(struct dma_buf * dmabuf)33static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} 34 #endif 35 #endif // _DMA_BUF_SYSFS_STATS_H 36