Merge tag 'gfs2-v6.5-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / dma-buf / dma-buf-sysfs-stats.h
CommitLineData
bdb8d06d
HV
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
13int dma_buf_init_sysfs_statistics(void);
14void dma_buf_uninit_sysfs_statistics(void);
15
f728a5ea 16int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file);
bdb8d06d 17
bdb8d06d 18void dma_buf_stats_teardown(struct dma_buf *dmabuf);
bdb8d06d
HV
19#else
20
21static inline int dma_buf_init_sysfs_statistics(void)
22{
23 return 0;
24}
25
26static inline void dma_buf_uninit_sysfs_statistics(void) {}
27
f728a5ea 28static inline int dma_buf_stats_setup(struct dma_buf *dmabuf, struct file *file)
bdb8d06d
HV
29{
30 return 0;
31}
bdb8d06d
HV
32
33static inline void dma_buf_stats_teardown(struct dma_buf *dmabuf) {}
bdb8d06d
HV
34#endif
35#endif // _DMA_BUF_SYSFS_STATS_H