From patchwork Fri Oct 17 19:04:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38994 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 24FEC202DB for ; Fri, 17 Oct 2014 19:04:32 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gi9sf817231lab.2 for ; Fri, 17 Oct 2014 12:04:30 -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=ysEErKgIEaD9jM7UyDa7v4kAhyRCRuBAtwFdiZiH+34=; b=iTK+8G1SfVYFnbsvONNesvY/DMlw9XPIEQEyjem2K+XvERf1no0O8+x+wX/yiBVlTI OA64PHMzn/9j29moJwopLTHAsNJwDrO5tvl2S0NBSYbKwqJrnt2BYqtiT+ghB1FBgei9 k8C6XFF1GwiOFcY/+xrRptfCyd8QG4eQPdnT+DYhqOdUfVujHtDHqZEemko/vrvx5+KG pGSVacJE5xj17z1QscHTZsqUQsRtDjaXazu2hZs+pZxDw21iy8cN1qIgaf1v/hJeYZUq JpCyENEbyY5jHIfA5XOYI/5/2riV7E7htENoAzH9kTxyJld7H5oTqCRQX3gbftlL11kZ OLOA== X-Gm-Message-State: ALoCoQn47UMvxwygIT49m4Wj0vPcwznJ+C4J46syrTScang8urvNLfqqZ6aCIqLVjtA0fkWL44Sk X-Received: by 10.112.254.226 with SMTP id al2mr1677296lbd.1.1413572670861; Fri, 17 Oct 2014 12:04:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.10 with SMTP id m10ls292293laj.72.gmail; Fri, 17 Oct 2014 12:04:30 -0700 (PDT) X-Received: by 10.112.11.201 with SMTP id s9mr6437879lbb.79.1413572670717; Fri, 17 Oct 2014 12:04:30 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id i9si3353563lag.115.2014.10.17.12.04.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 12:04:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id z11so1199103lbi.13 for ; Fri, 17 Oct 2014 12:04:30 -0700 (PDT) X-Received: by 10.112.167.38 with SMTP id zl6mr10837879lbb.34.1413572670517; Fri, 17 Oct 2014 12:04:30 -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 c5csp285848lbz; Fri, 17 Oct 2014 12:04:29 -0700 (PDT) X-Received: by 10.66.66.193 with SMTP id h1mr10502505pat.103.1413572668868; Fri, 17 Oct 2014 12:04:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bt9si1792113pdb.182.2014.10.17.12.04.28 for ; Fri, 17 Oct 2014 12:04:28 -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 S1753669AbaJQTE0 (ORCPT + 3 others); Fri, 17 Oct 2014 15:04:26 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:59982 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753318AbaJQTE0 (ORCPT ); Fri, 17 Oct 2014 15:04:26 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HJ4OFj025727; Fri, 17 Oct 2014 14:04:24 -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 s9HJ4OxB011883; Fri, 17 Oct 2014 14:04:24 -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 14:04:23 -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 s9HJ4NFb004246; Fri, 17 Oct 2014 14:04:23 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Alan Stern , Greg KH , Felipe Balbi Subject: [PATCH v2 51/67] usb: gadget: udc: net2280: do not rely on 'driver' argument Date: Fri, 17 Oct 2014 14:04:13 -0500 Message-ID: <1413572653-14056-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413566234-13537-52-git-send-email-balbi@ti.com> References: <1413566234-13537-52-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.217.182 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index 8d13337..ee74b9d 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -2446,11 +2446,9 @@ static int net2280_stop(struct usb_gadget *_gadget, dev = container_of(_gadget, struct net2280, gadget); spin_lock_irqsave(&dev->lock, flags); - stop_activity(dev, driver); + stop_activity(dev, NULL); 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; }