Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * DMA-BUF sysfs statistics.
0004  *
0005  * Copyright (C) 2021 Google LLC.
0006  */
0007 
0008 #ifndef _DMA_BUF_SYSFS_STATS_H
0009 #define _DMA_BUF_SYSFS_STATS_H
0010 
0011 #ifdef CONFIG_DMABUF_SYSFS_STATS
0012 
0013 int dma_buf_init_sysfs_statistics(void);
0014 void dma_buf_uninit_sysfs_statistics(void);
0015 
0016 int dma_buf_stats_setup(struct dma_buf *dmabuf);
0017 
0018 void dma_buf_stats_teardown(struct dma_buf *dmabuf);
0019 #else
0020 
0021 static inline int dma_buf_init_sysfs_statistics(void)
0022 {
0023     return 0;
0024 }
0025 
0026 static inline void dma_buf_uninit_sysfs_statistics(void) {}
0027 
0028 static inline int dma_buf_stats_setup(struct dma_buf *dmabuf)
0029 {
0030     return 0;
0031 }
0032 
0033 static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {}
0034 #endif
0035 #endif // _DMA_BUF_SYSFS_STATS_H