From 1ac13658e122c03ca866a886c093ed905df3ffdc Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 11 Mar 2020 00:27:42 +1100 Subject: [PATCH] [module] fix compilation for linux 5.6 --- VERSION | 2 +- module/kvmfr.c | 20 +------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/VERSION b/VERSION index f58605d7..cb19b492 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-157-ge2adbaa5c1+1 \ No newline at end of file +B1-158-g582ed6b5d1+1 \ No newline at end of file diff --git a/module/kvmfr.c b/module/kvmfr.c index cde97c9c..d118fdfe 100644 --- a/module/kvmfr.c +++ b/module/kvmfr.c @@ -28,6 +28,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include #include +#include #include @@ -122,27 +123,10 @@ static void unmap_kvmfrbuf(struct dma_buf_attachment * at, struct sg_table * sg, static void release_kvmfrbuf(struct dma_buf * buf) { struct kvmfrbuf *kbuf = (struct kvmfrbuf *)buf->priv; - pgoff_t pg; - - for (pg = 0; pg < kbuf->pagecount; pg++) - put_page(kbuf->pages[pg]); - kfree(kbuf->pages); kfree(kbuf); } -static void * kmap_kvmfrbuf(struct dma_buf * buf, unsigned long page_num) -{ - struct kvmfrbuf * kbuf = (struct kvmfrbuf *)buf->priv; - struct page * page = kbuf->pages[page_num]; - return kmap(page); -} - -static void kunmap_kvmfrbuf(struct dma_buf * buf, unsigned long page_num, void * vaddr) -{ - kunmap(vaddr); -} - static int mmap_kvmfrbuf(struct dma_buf * buf, struct vm_area_struct * vma) { if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0) @@ -157,8 +141,6 @@ static const struct dma_buf_ops kvmfrbuf_ops = .map_dma_buf = map_kvmfrbuf, .unmap_dma_buf = unmap_kvmfrbuf, .release = release_kvmfrbuf, - .map = kmap_kvmfrbuf, - .unmap = kunmap_kvmfrbuf, .mmap = mmap_kvmfrbuf };