From ccc5c5b34cef4dc88082501761880809a03e62d2 Mon Sep 17 00:00:00 2001 From: William Wu Date: Wed, 31 Oct 2018 17:52:02 +0800 Subject: [PATCH] usb: gadget: uvc: add compat_ioctl This allows 32 bit owners of uvc video to make ioctls into a 64 bit kernel. All of the current uvc ioctls can be handled with the same struct definitions as regular ioctl. Change-Id: Ia31b26147ab619f0673f94b6662eaf181a9eb5dd Signed-off-by: William Wu --- drivers/usb/gadget/function/uvc_v4l2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c index 7f1ca3b57823..8c992724c03f 100644 --- a/drivers/usb/gadget/function/uvc_v4l2.c +++ b/drivers/usb/gadget/function/uvc_v4l2.c @@ -356,6 +356,9 @@ const struct v4l2_file_operations uvc_v4l2_fops = { .open = uvc_v4l2_open, .release = uvc_v4l2_release, .unlocked_ioctl = video_ioctl2, +#ifdef CONFIG_COMPAT + .compat_ioctl32 = video_ioctl2, +#endif .mmap = uvc_v4l2_mmap, .poll = uvc_v4l2_poll, #ifndef CONFIG_MMU