From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757248AbcIVNwP (ORCPT ); Thu, 22 Sep 2016 09:52:15 -0400 Received: from atlantic540.startdedicated.de ([188.138.9.77]:44304 "EHLO atlantic540.startdedicated.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757191AbcIVNwN (ORCPT ); Thu, 22 Sep 2016 09:52:13 -0400 From: Daniel Wagner To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Daniel Wagner , Felipe Balbi , Michal Nazarewicz , Greg Kroah-Hartman Subject: [PATCH] usb: gadget: f_fs: use complete() instead complete_all() Date: Thu, 22 Sep 2016 15:51:53 +0200 Message-Id: <1474552313-29257-1-git-send-email-wagi@monom.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context reinit_completion() usb_esp_queue() wait_for_completion_interruptible() ffs_ep0_complete() complete() Signed-off-by: Daniel Wagner Cc: Felipe Balbi Cc: Michal Nazarewicz Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org --- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 5c8429f..0c29039 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -211,7 +211,7 @@ static void ffs_ep0_complete(struct usb_ep *ep, struct usb_request *req) { struct ffs_data *ffs = req->context; - complete_all(&ffs->ep0req_completion); + complete(&ffs->ep0req_completion); } static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len) -- 2.7.4