ANDROID: dma-buf: Fix build breakage with !CONFIG_DMABUF_SYSFS_STATS

The commit c5589c7eec ("ANDROID: dma-buf: Add vendor hook for
deferred dmabuf sysfs stats release") introduced a build breakage
on non-GKI targets which don't have CONFIG_DMABUF_SYSFS_STATS
enabled. It is due to invisibility of struct dma_buf_sysfs_entry
in the trace hook header file. We can get away with it by moving
the header inclusion from trace hook header to vendor hooks driver.

Bug: 261818075
Change-Id: Ibb79bd67c9f1b36fe2b5d569ab9369f376a78b77
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This commit is contained in:
Pavankumar Kondeti
2022-12-08 15:05:08 +05:30
committed by Treehugger Robot
parent ce18af9b5d
commit 8ad88eae4b
2 changed files with 1 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
*/
#ifndef __GENKSYMS__
#include <linux/dma-buf.h>
#include <linux/rmap.h>
#endif

View File

@@ -11,13 +11,7 @@
#include <trace/hooks/vendor_hooks.h>
#ifdef __GENKSYMS__
struct dma_buf_sysfs_entry;
#else
/* struct dma_buf_sysfs_entry */
#include <linux/dma-buf.h>
#endif
DECLARE_RESTRICTED_HOOK(android_rvh_dma_buf_stats_teardown,
TP_PROTO(struct dma_buf_sysfs_entry *sysfs_entry, bool *skip_sysfs_release),
TP_ARGS(sysfs_entry, skip_sysfs_release), 1);