Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1585329

[PATCH] dma-buf: add support for compat ioctl

From Marek Szyprowski <m.szyprowski@samsung.com>
Newsgroups linux.kernel
Subject [PATCH] dma-buf: add support for compat ioctl
Date 2017-02-21 14:30 +0100
Message-ID <tdiFX-37b-3@gated-at.bofh.it> (permalink)
References <tdiFX-37b-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add compat ioctl support to dma-buf. This lets one to use DMA_BUF_IOCTL_SYNC
ioctl from 32bit application on 64bit kernel. Data structures for both 32
and 64bit modes are same, so there is no need for additional translation
layer.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/dma-buf/dma-buf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 718f832a5c71..0007b792827b 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -325,6 +325,9 @@ static long dma_buf_ioctl(struct file *file,
 	.llseek		= dma_buf_llseek,
 	.poll		= dma_buf_poll,
 	.unlocked_ioctl	= dma_buf_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl	= dma_buf_ioctl,
+#endif
 };
 
 /*
-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] dma-buf: add support for compat ioctl Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-21 14:30 +0100
  Re: [PATCH] dma-buf: add support for compat ioctl Christian König <deathsimple@vodafone.de> - 2017-02-21 15:00 +0100
    Re: [PATCH] dma-buf: add support for compat ioctl Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-21 15:40 +0100
      Re: [PATCH] dma-buf: add support for compat ioctl Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-21 16:00 +0100
        Re: [PATCH] dma-buf: add support for compat ioctl Christian König <deathsimple@vodafone.de> - 2017-02-21 16:10 +0100
          Re: [PATCH] dma-buf: add support for compat ioctl Daniel Vetter <daniel@ffwll.ch> - 2017-02-22 20:10 +0100
            Re: [PATCH] dma-buf: add support for compat ioctl Sumit Semwal <sumit.semwal@linaro.org> - 2017-02-23 07:50 +0100

csiph-web