From patchwork Fri Oct 17 17:16:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38941 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2BE520973 for ; Fri, 17 Oct 2014 17:18:38 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id a1sf725141wgh.5 for ; Fri, 17 Oct 2014 10:18:37 -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=uyOmlIDdT8kC89UlfRbwrEeevOmaFyqyhZpZ4rnfnPY=; b=J3fDl5wzyWhlL04a4ngZTJwxP3Yo0KUAs8NVopBA3vc7elcRfeYiJCVRn4MFxwjI/7 VcDXpQiph18FCWeJJgfDMCzqNMp1xPR/e08jWTY2PNsrBmTb71k2PVROlRXjYxzg+TBv jviJzRwN2wqTGMbZBTdqzbZpXPbi/qZLEcn0KYrwexPYRqXYKuyi0X1VCT3nZGUT30jO tNqbILCm6wzL1bmHwhyPnGVAXUj3l9aDP+O4nD6V2eDPwgmxKRbt7Rb2t/6V1l8f2GI9 QMW1aiveMZokgOgntz6/Io9J+7bya2Ec0vTfSbz1oKc8Px5lXR9CocEwKCJO9NwO0Cv2 Nfjw== X-Gm-Message-State: ALoCoQnoM6QtIlqCOoLr4lgJwi/MjnEjRGUQgWhNpL8g78F5Hg8szr42meD0n3LoHTPk4B+Eimqh X-Received: by 10.181.27.135 with SMTP id jg7mr53001wid.5.1413566317889; Fri, 17 Oct 2014 10:18:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.2 with SMTP id ku2ls201958lac.2.gmail; Fri, 17 Oct 2014 10:18:37 -0700 (PDT) X-Received: by 10.153.11.133 with SMTP id ei5mr10224205lad.75.1413566317508; Fri, 17 Oct 2014 10:18:37 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id x9si3031813lbb.28.2014.10.17.10.18.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id gf13so1176647lab.29 for ; Fri, 17 Oct 2014 10:18:37 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr1964439lbw.66.1413566317337; Fri, 17 Oct 2014 10:18:37 -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 c5csp268131lbz; Fri, 17 Oct 2014 10:18:36 -0700 (PDT) X-Received: by 10.67.29.177 with SMTP id jx17mr9960936pad.56.1413566313865; Fri, 17 Oct 2014 10:18:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sn3si1594984pbc.175.2014.10.17.10.18.33 for ; Fri, 17 Oct 2014 10:18:33 -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 S1753710AbaJQRS3 (ORCPT + 3 others); Fri, 17 Oct 2014 13:18:29 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:55847 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753704AbaJQRS0 (ORCPT ); Fri, 17 Oct 2014 13:18:26 -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 s9HHIIFU011770; Fri, 17 Oct 2014 12:18:18 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHIIc6029832; Fri, 17 Oct 2014 12:18:18 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:18:19 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHIHhh031266; Fri, 17 Oct 2014 12:18:18 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Greg KH , , Paul Zimmerman , , , , , , , Felipe Balbi Subject: [PATCH 51/67] usb: gadget: udc: net2280: do not rely on 'driver' argument Date: Fri, 17 Oct 2014 12:16:58 -0500 Message-ID: <1413566234-13537-52-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.42 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/net2280.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index 8d13337..a15a343 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -2449,8 +2449,6 @@ static int net2280_stop(struct usb_gadget *_gadget, stop_activity(dev, driver); spin_unlock_irqrestore(&dev->lock, flags); - dev->driver = NULL; - net2280_led_active(dev, 0); /* Disable full-speed test mode */ @@ -2460,8 +2458,8 @@ static int net2280_stop(struct usb_gadget *_gadget, device_remove_file(&dev->pdev->dev, &dev_attr_function); device_remove_file(&dev->pdev->dev, &dev_attr_queues); - ep_dbg(dev, "unregistered driver '%s'\n", - driver ? driver->driver.name : ""); + ep_dbg(dev, "unregistered driver '%s'\n", dev->driver->driver.name); + dev->driver = NULL; return 0; }