diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/legacy/inode.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 175c9956cbe3..b64538b498dc 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c | |||
@@ -655,9 +655,10 @@ static void ffs_user_copy_worker(struct work_struct *work) | |||
655 | unuse_mm(io_data->mm); | 655 | unuse_mm(io_data->mm); |
656 | } | 656 | } |
657 | 657 | ||
658 | aio_complete(io_data->kiocb, ret, ret); | 658 | io_data->kiocb->ki_complete(io_data->kiocb, ret, ret); |
659 | 659 | ||
660 | if (io_data->ffs->ffs_eventfd && !io_data->kiocb->ki_eventfd) | 660 | if (io_data->ffs->ffs_eventfd && |
661 | !(io_data->kiocb->ki_flags & IOCB_EVENTFD)) | ||
661 | eventfd_signal(io_data->ffs->ffs_eventfd, 1); | 662 | eventfd_signal(io_data->ffs->ffs_eventfd, 1); |
662 | 663 | ||
663 | usb_ep_free_request(io_data->ep, io_data->req); | 664 | 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..a4a80694f607 100644 --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c | |||
@@ -469,7 +469,7 @@ static void ep_user_copy_worker(struct work_struct *work) | |||
469 | ret = -EFAULT; | 469 | ret = -EFAULT; |
470 | 470 | ||
471 | /* completing the iocb can drop the ctx and mm, don't touch mm after */ | 471 | /* completing the iocb can drop the ctx and mm, don't touch mm after */ |
472 | aio_complete(iocb, ret, ret); | 472 | iocb->ki_complete(iocb, ret, ret); |
473 | 473 | ||
474 | kfree(priv->buf); | 474 | kfree(priv->buf); |
475 | kfree(priv->to_free); | 475 | kfree(priv->to_free); |
@@ -497,7 +497,8 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req) | |||
497 | kfree(priv); | 497 | kfree(priv); |
498 | iocb->private = NULL; | 498 | iocb->private = NULL; |
499 | /* aio_complete() reports bytes-transferred _and_ faults */ | 499 | /* aio_complete() reports bytes-transferred _and_ faults */ |
500 | aio_complete(iocb, req->actual ? req->actual : req->status, | 500 | |
501 | iocb->ki_complete(iocb, req->actual ? req->actual : req->status, | ||
501 | req->status); | 502 | req->status); |
502 | } else { | 503 | } else { |
503 | /* ep_copy_to_user() won't report both; we hide some faults */ | 504 | /* ep_copy_to_user() won't report both; we hide some faults */ |