From patchwork Thu Oct 16 12:57:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5091781 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C82409F30B for ; Thu, 16 Oct 2014 12:58:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3370020166 for ; Thu, 16 Oct 2014 12:58:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59CCC20154 for ; Thu, 16 Oct 2014 12:58:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751608AbaJPM6r (ORCPT ); Thu, 16 Oct 2014 08:58:47 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57455 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020AbaJPM62 (ORCPT ); Thu, 16 Oct 2014 08:58:28 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NDJ00HS2G686G80@mailout1.w1.samsung.com>; Thu, 16 Oct 2014 14:01:20 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-b8-543fc0f2f670 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 1C.65.25543.2F0CF345; Thu, 16 Oct 2014 13:58:26 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NDJ00F34G17BB00@eusync2.samsung.com>; Thu, 16 Oct 2014 13:58:26 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Kyungmin Park , Robert Baldyga , Paul Zimmerman , Krzysztof Kozlowski Subject: [PATCH 3/9] usb: dwc2/gadget: fix support for soft_connect udc framework feature Date: Thu, 16 Oct 2014 14:57:59 +0200 Message-id: <1413464285-24172-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1413464285-24172-1-git-send-email-m.szyprowski@samsung.com> References: <1413464285-24172-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFJMWRmVeSWpSXmKPExsVy+t/xK7qfDtiHGLxaKmHx+oWhxdmmN+wW M87vY7JYtKyV2WLtkbvsFtunTGeyeHB4J7sDu0ffllWMHlv2f2b0+LxJLoA5issmJTUnsyy1 SN8ugSuj70ZlwTK2ilXTu9gaGJeydjFycEgImEhMWZnaxcgJZIpJXLi3nq2LkYtDSGApo8Tp ZasYIZw+Jol5f24zglSxCRhKdL3tYgOxRQQcJJYsvQPWwSxwh1Fi/f5PTCAJYYFoiSVnFoDZ LAKqEn9aVrCA2LwCHhKz3l1lgVgnJ/H/5QqwGk4BT4ldm1cyg9hCQDXnr05nnMDIu4CRYRWj aGppckFxUnquoV5xYm5xaV66XnJ+7iZGSPh82cG4+JjVIUYBDkYlHl6NYPsQIdbEsuLK3EOM EhzMSiK8iyYBhXhTEiurUovy44tKc1KLDzEycXBKNTAK9wd9dY0wZm9YHJz2fbbMs9tLPktc MOzOyb3iPuWQuJyY5teYhzmzQ1ctWxnr+7xgupZZDMchlr/LFC8+Z3weqZtUyzFNa8OtM7Pf zmhsmTHrgfMmhicdM27GV+n8ebZ6MeduR5sir496Z2psFlwoVvQxEzFZLzqxXYOr823Bkclm xmxnecSUWIozEg21mIuKEwHzjMzF/QEAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enabling and disabling usb gadget by writing to /sys/class/udc/*hsotg/soft_connect results in calling udc_start/udc_stop functions with the same usb gadget driver, so the driver should not WARN about such case. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 8870e38c1d82..37fda4c03397 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2892,7 +2892,7 @@ static int s3c_hsotg_udc_start(struct usb_gadget *gadget, return -EINVAL; } - WARN_ON(hsotg->driver); + WARN_ON(hsotg->driver && hsotg->driver != driver); driver->driver.bus = NULL; hsotg->driver = driver;