From patchwork Tue Apr 24 20:59:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 10361081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D047E602D6 for ; Tue, 24 Apr 2018 21:00:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF30028AB7 for ; Tue, 24 Apr 2018 21:00:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3E4928B3F; Tue, 24 Apr 2018 21:00:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50AA928AB7 for ; Tue, 24 Apr 2018 21:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751251AbeDXVAQ (ORCPT ); Tue, 24 Apr 2018 17:00:16 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:47370 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbeDXVAP (ORCPT ); Tue, 24 Apr 2018 17:00:15 -0400 Received: from garnet.hsd1.pa.comcast.net (unknown [IPv6:2601:547:500:4c18:3f80:d6cb:283e:9a0]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 03D1A60E7; Tue, 24 Apr 2018 23:00:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1524603614; bh=sKWFGwnFdD0i6vVH50bv0mlzqVHYKn7ahhxwoq+I6k8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=YPl8kUnHAlCy1B50TCBv3ql4ifcmk22pvLB9QT4zlKKNjbHUotQChGKSzIM2qiB7O f4u/Py91dkVDq6nT5TBvbYnzJmVf5jkj3r+Ih7yTi2/EDRFOTX/S6JO7u2QOKWKlN+ fhjCGrC/aS6s19yqSnG4/Xdz79MukWzMqPHO+7Pw= From: Paul Elder To: linux-usb@vger.kernel.org Cc: Paul Elder , laurent.pinchart@ideasonboard.com, balbi@kernel.org, gregkh@linuxfoundation.org, rogerq@ti.com Subject: [PATCH v2 2/3] usb: gadget: uvc: remove delay usb status phase Date: Tue, 24 Apr 2018 16:59:35 -0400 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The completion of the usb status phase doesn't need to be delayed from uvc_function_set_alt to uvc_v4l2_streamon/off. Remove USB_GADGET_DELAYED_STATUS and usb_composite_setup_delay from these two, respectively. Signed-off-by: Paul Elder --- Changes in v2: 1. Remove delay usb status phase drivers/usb/gadget/function/f_uvc.c | 3 ++- drivers/usb/gadget/function/uvc_v4l2.c | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index 9b63b28a1ee3..fa34dcbe1197 100644 --- a/drivers/usb/gadget/function/f_uvc.c +++ b/drivers/usb/gadget/function/f_uvc.c @@ -361,7 +361,8 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt) memset(&v4l2_event, 0, sizeof(v4l2_event)); v4l2_event.type = UVC_EVENT_STREAMON; v4l2_event_queue(&uvc->vdev, &v4l2_event); - return USB_GADGET_DELAYED_STATUS; + + return 0; default: return -EINVAL; diff --git a/drivers/usb/gadget/function/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c index fdf02b6987c0..138d95b3b8d1 100644 --- a/drivers/usb/gadget/function/uvc_v4l2.c +++ b/drivers/usb/gadget/function/uvc_v4l2.c @@ -206,12 +206,6 @@ uvc_v4l2_streamon(struct file *file, void *fh, enum v4l2_buf_type type) uvc->state = UVC_STATE_STREAMING; - /* - * Complete the alternate setting selection setup phase now that - * userspace is ready to provide video frames. - */ - uvc_function_setup_continue(uvc); - return 0; }