diff options
author | Jerry Zhang <zhangjerry@google.com> | 2018-03-30 15:32:19 -0700 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-15 10:08:56 +0300 |
commit | 6819e3233f244be6e8ea4aba139434ada0698743 (patch) | |
tree | 5243350b172b34d0a1a2f427ed4ddf4a60d2e288 /drivers/usb/gadget/function/f_fs.c | |
parent | 9286e24b837151a5a59e7403cea3e4a2c33ba225 (diff) | |
download | op-kernel-dev-6819e3233f244be6e8ea4aba139434ada0698743.zip op-kernel-dev-6819e3233f244be6e8ea4aba139434ada0698743.tar.gz |
usb: gadget: f_fs: Add compat_ioctl to epfiles
This allows 32 bit owners of ffs endpoints to
make ioctls into a 64 bit kernel.
All of the current epfile ioctls can be handled
with the same struct definitions as regular
ioctl.
Acked-by: MichaĆ Nazarewicz <mina86@mina86.com>
Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_fs.c')
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 0294e4f..199d257 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1266,6 +1266,14 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code, return ret; } +#ifdef CONFIG_COMPAT +static long ffs_epfile_compat_ioctl(struct file *file, unsigned code, + unsigned long value) +{ + return ffs_epfile_ioctl(file, code, value); +} +#endif + static const struct file_operations ffs_epfile_operations = { .llseek = no_llseek, @@ -1274,6 +1282,9 @@ static const struct file_operations ffs_epfile_operations = { .read_iter = ffs_epfile_read_iter, .release = ffs_epfile_release, .unlocked_ioctl = ffs_epfile_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = ffs_epfile_compat_ioctl, +#endif }; |