18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * DMA-BUF sysfs statistics. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2021 Google LLC. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _DMA_BUF_SYSFS_STATS_H 98c2ecf20Sopenharmony_ci#define _DMA_BUF_SYSFS_STATS_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifdef CONFIG_DMABUF_SYSFS_STATS 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciint dma_buf_init_sysfs_statistics(void); 148c2ecf20Sopenharmony_civoid dma_buf_uninit_sysfs_statistics(void); 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciint dma_buf_stats_setup(struct dma_buf *dmabuf); 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_civoid dma_buf_stats_teardown(struct dma_buf *dmabuf); 198c2ecf20Sopenharmony_ci#else 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistatic inline int dma_buf_init_sysfs_statistics(void) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci return 0; 248c2ecf20Sopenharmony_ci} 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistatic inline void dma_buf_uninit_sysfs_statistics(void) {} 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistatic inline int dma_buf_stats_setup(struct dma_buf *dmabuf) 298c2ecf20Sopenharmony_ci{ 308c2ecf20Sopenharmony_ci return 0; 318c2ecf20Sopenharmony_ci} 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_cistatic inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {} 348c2ecf20Sopenharmony_ci#endif 358c2ecf20Sopenharmony_ci#endif // _DMA_BUF_SYSFS_STATS_H 36