All of lore.kernel.org
 help / color / mirror / Atom feed
* usb: gadget: f_fs: Add compat_ioctl to epfiles
@ 2018-03-30 22:32 Jerry Zhang
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry Zhang @ 2018-03-30 22:32 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Michal Nazarewicz
  Cc: linux-usb, Jerry Zhang

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.

Signed-off-by: Jerry Zhang <zhangjerry@google.com>
---
 drivers/usb/gadget/function/f_fs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index d2428a9e8900..34d80cc2b667 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1262,6 +1262,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,
 
@@ -1270,6 +1278,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
 };
 
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* usb: gadget: f_fs: Add compat_ioctl to epfiles
@ 2018-03-31 18:41 Michał Nazarewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Nazarewicz @ 2018-03-31 18:41 UTC (permalink / raw)
  To: Jerry Zhang; +Cc: Felipe Balbi, Greg Kroah-Hartman, USB list

2018-03-30 23:32 GMT+01:00 Jerry Zhang <zhangjerry@google.com>:
> 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.
>
> Signed-off-by: Jerry Zhang <zhangjerry@google.com>

Acked-by: Michał Nazarewicz <mina86@mina86.com>

> ---
>  drivers/usb/gadget/function/f_fs.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
> index d2428a9e8900..34d80cc2b667 100644
> --- a/drivers/usb/gadget/function/f_fs.c
> +++ b/drivers/usb/gadget/function/f_fs.c
> @@ -1262,6 +1262,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,
>
> @@ -1270,6 +1278,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
>  };
>
>
> --
> 2.17.0.rc1.321.gba9d0f2565-goog
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-31 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 22:32 usb: gadget: f_fs: Add compat_ioctl to epfiles Jerry Zhang
2018-03-31 18:41 Michał Nazarewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.