usb: gadget: add compat_ioctl

This allows 32 bit owners of USB Class to make ioctls
into a 64 bit kernel.

Change-Id: Ia31b26147ab619f0673f94b6662eaf181a9eb5dd
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
William Wu
2018-10-31 17:52:02 +08:00
committed by Tao Huang
parent 4ac7546e3b
commit 7ccab04742
2 changed files with 6 additions and 0 deletions

View File

@@ -922,6 +922,9 @@ static const struct file_operations acc_fops = {
.read = acc_read,
.write = acc_write,
.unlocked_ioctl = acc_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = acc_ioctl,
#endif
.open = acc_open,
.release = acc_release,
};

View File

@@ -354,6 +354,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