From patchwork Fri Oct 17 17:16:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5019D202DB for ; Fri, 17 Oct 2014 17:19:17 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id b6sf721075lbj.11 for ; Fri, 17 Oct 2014 10:19:16 -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=bTKyhBM0vncf+U92MKbeSQeSCw10MhHXkZ2zh9sIrek=; b=VNtvdAtwyhdUCFOTxVQzv2+dhIaIsasOAoftQVqm0vVMFo8s2aILtSXg9fTID4/2D0 POO57X1/VsDvD6GVi0qSnB/FBRuUT2mClrP2mAwhvsaTQ3Gvus9RMP2r5AwIhJ1e/g5h NOHFQyOld6WIkuArd9B4Hbv9sRdSg1l+cl4LMxIySGdHZezIF96cGGagN6YWs6QNPcTg o55jR1G3IfWNW2Vb/Dtd3XguqmIWoGj5qoU2DB1lknQm17PY1RR4hbE0et4iTjzrj1tS XGD2sC8yALh3yNSYMOo+GLDWDcip7Bk/nhsMzz8RrqAK9ZPgQOpCLsi8GIaU2Nh4HU9q /98A== X-Gm-Message-State: ALoCoQmg5ozyvXZqljhSvLakavvWQJO6p7yQTYGipsCCP1aPLxY6ZdPx8IrvtHHa1zxn8KxHaR9S X-Received: by 10.180.93.35 with SMTP id cr3mr59285wib.2.1413566356151; Fri, 17 Oct 2014 10:19:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.170 with SMTP id l10ls248483lah.18.gmail; Fri, 17 Oct 2014 10:19:16 -0700 (PDT) X-Received: by 10.112.52.33 with SMTP id q1mr10605737lbo.42.1413566355998; Fri, 17 Oct 2014 10:19:15 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id k17si2966768lab.102.2014.10.17.10.19.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id s18so1069799lam.37 for ; Fri, 17 Oct 2014 10:19:15 -0700 (PDT) X-Received: by 10.112.221.197 with SMTP id qg5mr10216385lbc.32.1413566355919; Fri, 17 Oct 2014 10:19:15 -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 c5csp268257lbz; Fri, 17 Oct 2014 10:19:15 -0700 (PDT) X-Received: by 10.70.96.4 with SMTP id do4mr9758081pdb.133.1413566344013; Fri, 17 Oct 2014 10:19:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tf2si376641pac.129.2014.10.17.10.19.03 for ; Fri, 17 Oct 2014 10:19:04 -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 S1753707AbaJQRS2 (ORCPT + 3 others); Fri, 17 Oct 2014 13:18:28 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:44397 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753702AbaJQRS0 (ORCPT ); Fri, 17 Oct 2014 13:18:26 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHIHZF008080; Fri, 17 Oct 2014 12:18:17 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHIHP6029804; Fri, 17 Oct 2014 12:18:17 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:18:17 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHIGKI030797; Fri, 17 Oct 2014 12:18:17 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Greg KH , , Paul Zimmerman , , , , , , , Felipe Balbi Subject: [PATCH 50/67] usb: gadget: udc: net2272: do not rely on 'driver' argument Date: Fri, 17 Oct 2014 12:16:57 -0500 Message-ID: <1413566234-13537-51-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: 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.215.50 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: , future patches will remove the extra 'driver' argument to ->udc_stop(), in order to do that, we must make sure that our UDC does not rely on it first. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/net2272.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 84d7162..6fb54f5 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c @@ -1511,12 +1511,13 @@ static int net2272_stop(struct usb_gadget *_gadget, dev = container_of(_gadget, struct net2272, gadget); spin_lock_irqsave(&dev->lock, flags); - stop_activity(dev, driver); + stop_activity(dev, NULL); spin_unlock_irqrestore(&dev->lock, flags); + dev_dbg(dev->dev, "unregistered driver '%s'\n", + dev->driver->driver.name); dev->driver = NULL; - dev_dbg(dev->dev, "unregistered driver '%s'\n", driver->driver.name); return 0; }