From 9784fbe79db1fb5d07162a9cd14e0044f3d54bc9 Mon Sep 17 00:00:00 2001 From: Vijayanand Jitta Date: Tue, 23 Feb 2021 12:35:35 +0530 Subject: [PATCH] ANDROID: dma-buf: Export is_dma_buf_file Export is_dma_buf_file function which will be used by the minidump module to get dmabuf info. Bug: 180978053 Change-Id: Ic8f7dd4f0a620839ab19f52841e9a6541515133c Signed-off-by: Vijayanand Jitta --- drivers/dma-buf/dma-buf.c | 5 ++--- include/linux/dma-buf.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 3e8a616edc0b..62e5ea655307 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -31,8 +31,6 @@ #include "dma-buf-sysfs-stats.h" -static inline int is_dma_buf_file(struct file *); - struct dma_buf_list { struct list_head head; struct mutex lock; @@ -488,10 +486,11 @@ static const struct file_operations dma_buf_fops = { /* * is_dma_buf_file - Check if struct file* is associated with dma_buf */ -static inline int is_dma_buf_file(struct file *file) +int is_dma_buf_file(struct file *file) { return file->f_op == &dma_buf_fops; } +EXPORT_SYMBOL_GPL(is_dma_buf_file); static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags) { diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index c91d6a24c40a..893301220f99 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -588,6 +588,7 @@ dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) return !!attach->importer_ops; } +int is_dma_buf_file(struct file *file); struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, struct device *dev); struct dma_buf_attachment *