dma-buf-sysfs-stats.h 729 B

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