Message ID | 1413566234-13537-19-git-send-email-balbi@ti.com |
---|---|
State | Accepted |
Commit | 0abd0696982534a5cf75e8129989fa3d4b734797 |
Headers | show
Return-Path: <patchwork-forward+bncBC5M7T4HYEKRBPU7QWRAKGQEQV5AK6A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 66E0B202DB for <linaro@patches.linaro.org>; Fri, 17 Oct 2014 17:19:59 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf722517lab.3 for <linaro@patches.linaro.org>; Fri, 17 Oct 2014 10:19:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=mUm/HRAeQRD6xqeiCCm3Nj3gNClxCg5k0b950AM3ZQw=; b=dmCHeXUfiP/j3ElvUtg4jIukJLlcNRJmUwqb+j/zcrcxnpLW1ZLSAI9um5WB0QwCMH CGOhDjzZ3zZ0MA/AFuVAJ17KQMGuNvG1FKBraMWQMv52QUGi9E22s/I7mGVlRahLFZdI 3G8N+raXP6c7fTHr3lvrJUYqDxefaahmwCmxnOFelnVt0qMJApmNztVSvIkDgWAuphsI fegDAxaAYpjgzNJlVKFQf6qm4za89rNUmWf9bY2jIJ5DUrSQ8rYPv+WCE15LAkPNPLHU 9F60mW2qcsmzaJZVtJflGTStq5B9jp1gcFn7/Jbr+SocILeZ+SE+/q4ToPIo6LM7pOJ+ Ov4w== X-Gm-Message-State: ALoCoQmv0V7jDQpHaqpZiHdezUtxUMHLaYOrzEg1h4Zb+EPY0ZuYbudVXbpXXtN1OKrwmQKKHsKD X-Received: by 10.112.154.194 with SMTP id vq2mr698962lbb.10.1413566398310; Fri, 17 Oct 2014 10:19:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.229 with SMTP id h5ls293749lam.4.gmail; Fri, 17 Oct 2014 10:19:58 -0700 (PDT) X-Received: by 10.112.221.226 with SMTP id qh2mr10320743lbc.5.1413566398074; Fri, 17 Oct 2014 10:19:58 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id an7si2942321lac.128.2014.10.17.10.19.58 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id w7so1020354lbi.22 for <patchwork-forward@linaro.org>; Fri, 17 Oct 2014 10:19:58 -0700 (PDT) X-Received: by 10.112.167.38 with SMTP id zl6mr10268917lbb.34.1413566397992; Fri, 17 Oct 2014 10:19:57 -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 c5csp268402lbz; Fri, 17 Oct 2014 10:19:57 -0700 (PDT) X-Received: by 10.66.185.49 with SMTP id ez17mr9734355pac.25.1413566395538; Fri, 17 Oct 2014 10:19:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ap1si1616281pbc.152.2014.10.17.10.19.54 for <multiple recipients>; Fri, 17 Oct 2014 10:19:55 -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 S1753854AbaJQRTv (ORCPT <rfc822;amit.pundir@linaro.org> + 3 others); Fri, 17 Oct 2014 13:19:51 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:55773 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298AbaJQRRx (ORCPT <rfc822;linux-usb@vger.kernel.org>); Fri, 17 Oct 2014 13:17:53 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHHjhm011709; Fri, 17 Oct 2014 12:17:45 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHj2E029307; Fri, 17 Oct 2014 12:17:45 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:17:45 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHiid003027; Fri, 17 Oct 2014 12:17:45 -0500 From: Felipe Balbi <balbi@ti.com> To: Linux USB Mailing List <linux-usb@vger.kernel.org> CC: Greg KH <gregkh@linuxfoundation.org>, <m.szyprowski@samsung.com>, Paul Zimmerman <paul.zimmerman@synopsys.com>, <daniel@zonque.org>, <leoli@freescale.com>, <andrzej.p@samsung.com>, <r.baldyga@samsung.com>, <mina86@mina86.com>, <Peter.Chen@freescale.com>, Felipe Balbi <balbi@ti.com> Subject: [PATCH 18/67] usb: gadget: udc-core: call ->disconnect() when soft disconnecting Date: Fri, 17 Oct 2014 12:16:25 -0500 Message-ID: <1413566234-13537-19-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413566234-13537-1-git-send-email-balbi@ti.com> References: <1413566234-13537-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.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.217.177 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> Content-Type: text/plain |
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index f205465..ddc6f57 100644 --- a/drivers/usb/gadget/udc/udc-core.c +++ b/drivers/usb/gadget/udc/udc-core.c @@ -517,6 +517,7 @@ static ssize_t usb_udc_softconn_store(struct device *dev, usb_gadget_connect(udc->gadget); } else if (sysfs_streq(buf, "disconnect")) { usb_gadget_disconnect(udc->gadget); + udc->driver->disconnect(udc->gadget); usb_gadget_udc_stop(udc->gadget, udc->driver); } else { dev_err(dev, "unsupported command '%s'\n", buf);
when disconnecting from host using our soft_connect sysfs interface, also let the gadget driver know about it by calling the gadget driver's ->disconnect() method. No problems have been found while not calling ->disconnect() so far, it's just good convention. Signed-off-by: Felipe Balbi <balbi@ti.com> --- drivers/usb/gadget/udc/udc-core.c | 1 + 1 file changed, 1 insertion(+)