aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:24:41 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:24:41 -0400
commitc0fec3a98bd6c4d992f191ee1aa0b3599213f3d4 (patch)
tree24b4533146ce10bcf4af6fca0971311ece523d58 /drivers/usb
parentc1b8940b42bb6487b10f2267a96b486276ce9ff7 (diff)
parente2e40f2c1ed433c5e224525c8c862fd32e5d3df2 (diff)
Merge branch 'iocb' into for-next
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/function/f_fs.c6
-rw-r--r--drivers/usb/gadget/legacy/inode.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 175c9956cbe3..a12315a78248 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -23,6 +23,7 @@
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/hid.h> 24#include <linux/hid.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/uio.h>
26#include <asm/unaligned.h> 27#include <asm/unaligned.h>
27 28
28#include <linux/usb/composite.h> 29#include <linux/usb/composite.h>
@@ -655,9 +656,10 @@ static void ffs_user_copy_worker(struct work_struct *work)
655 unuse_mm(io_data->mm); 656 unuse_mm(io_data->mm);
656 } 657 }
657 658
658 aio_complete(io_data->kiocb, ret, ret); 659 io_data->kiocb->ki_complete(io_data->kiocb, ret, ret);
659 660
660 if (io_data->ffs->ffs_eventfd && !io_data->kiocb->ki_eventfd) 661 if (io_data->ffs->ffs_eventfd &&
662 !(io_data->kiocb->ki_flags & IOCB_EVENTFD))
661 eventfd_signal(io_data->ffs->ffs_eventfd, 1); 663 eventfd_signal(io_data->ffs->ffs_eventfd, 1);
662 664
663 usb_ep_free_request(io_data->ep, io_data->req); 665 usb_ep_free_request(io_data->ep, io_data->req);
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 200f9a584064..662ef2c1c62b 100644
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -26,6 +26,7 @@
26#include <linux/poll.h> 26#include <linux/poll.h>
27#include <linux/mmu_context.h> 27#include <linux/mmu_context.h>
28#include <linux/aio.h> 28#include <linux/aio.h>
29#include <linux/uio.h>
29 30
30#include <linux/device.h> 31#include <linux/device.h>
31#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
@@ -469,7 +470,7 @@ static void ep_user_copy_worker(struct work_struct *work)
469 ret = -EFAULT; 470 ret = -EFAULT;
470 471
471 /* completing the iocb can drop the ctx and mm, don't touch mm after */ 472 /* completing the iocb can drop the ctx and mm, don't touch mm after */
472 aio_complete(iocb, ret, ret); 473 iocb->ki_complete(iocb, ret, ret);
473 474
474 kfree(priv->buf); 475 kfree(priv->buf);
475 kfree(priv->to_free); 476 kfree(priv->to_free);
@@ -497,7 +498,8 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
497 kfree(priv); 498 kfree(priv);
498 iocb->private = NULL; 499 iocb->private = NULL;
499 /* aio_complete() reports bytes-transferred _and_ faults */ 500 /* aio_complete() reports bytes-transferred _and_ faults */
500 aio_complete(iocb, req->actual ? req->actual : req->status, 501
502 iocb->ki_complete(iocb, req->actual ? req->actual : req->status,
501 req->status); 503 req->status);
502 } else { 504 } else {
503 /* ep_copy_to_user() won't report both; we hide some faults */ 505 /* ep_copy_to_user() won't report both; we hide some faults */