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: 38810 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDBF520973 for ; Thu, 16 Oct 2014 12:58:54 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf1883984lab.1 for ; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=8u2F51jbJYvCSDQgqCr/VCg4cHZCrF2idY4QOE4JrOU=; b=DBhFK6Az5SW2jSXKOISISf5Bi+CEIOSJAeM+n15x3ldtrW0hwEfFRrKIuIk3D75Xfg ivjKgBU46ZaDshH/2V53KDhgF0nkZ6+AMlBHDECfB3QVadzzenMlMIHygVD1ATiwv2aL Xi0rYzYX6358siGKAWBbQvmulgcdb2kuMRaih9nJ4m/1irl9bTKuxgswQLRs4aGmYiKt Lv8dz1eS+y13tkXrb3CXBeD3Lq6X12XmhfSqF2o/btqRuJWtlExx0rez+MEV2mZfLofh 7bYKXeSt56Newh/i/OWol2rA/CjW+k8tma32hV4zy0jkIOXnal/ckpdEl0flTb5ed6DP ZLjw== X-Gm-Message-State: ALoCoQmUGvZZVZXVTzcIMNZSa+gGTBoIFiRjbBRtr0u0jmcxPlAHE4YuGZBOpPIqAdM+w5hsQVoW X-Received: by 10.112.99.72 with SMTP id eo8mr242314lbb.7.1413464333824; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.74 with SMTP id w10ls168950laj.99.gmail; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) X-Received: by 10.152.216.167 with SMTP id or7mr1336474lac.93.1413464333678; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id j2si34640550lbv.86.2014.10.16.05.58.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Oct 2014 05:58:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id pv20so2856513lab.34 for ; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) X-Received: by 10.153.8.164 with SMTP id dl4mr1432122lad.29.1413464333594; Thu, 16 Oct 2014 05:58:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp33535lbz; Thu, 16 Oct 2014 05:58:52 -0700 (PDT) X-Received: by 10.69.31.193 with SMTP id ko1mr1265870pbd.122.1413464330575; Thu, 16 Oct 2014 05:58:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mq9si18703545pbb.203.2014.10.16.05.58.49 for ; Thu, 16 Oct 2014 05:58:50 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492AbaJPM6s (ORCPT + 3 others); Thu, 16 Oct 2014 08:58:48 -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-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;