From patchwork Thu Jul 7 22:20:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 71644 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp126860qgy; Thu, 7 Jul 2016 15:24:02 -0700 (PDT) X-Received: by 10.98.0.83 with SMTP id 80mr4351999pfa.0.1467930237726; Thu, 07 Jul 2016 15:23:57 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id b5si130697paf.28.2016.07.07.15.23.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jul 2016 15:23:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLHhC-0000AP-F2; Thu, 07 Jul 2016 22:22:58 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLHg6-0007fF-E7 for linux-arm-kernel@lists.infradead.org; Thu, 07 Jul 2016 22:21:51 +0000 Received: by mail-pa0-x234.google.com with SMTP id b13so9533089pat.0 for ; Thu, 07 Jul 2016 15:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DLD+aoQQuRS/CaTkLu+DJCDMhW8MqEkp5wmTflxIMk0=; b=aFekdd4uFnJbXcFDWhEg3RCIsAuqMJ9Px8VjyZkZ8145qPTS1P8FcGffqn/LdpQZL+ i/Lz9RJAD+C6dp7WajPgsqA/g6g/3zR2EIxE94A/wHfccSdKdKeLQ/0tjeOH7NXZByU2 mmLBswoar6BZtYoMBRM+eM4lpmot208atbI5Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DLD+aoQQuRS/CaTkLu+DJCDMhW8MqEkp5wmTflxIMk0=; b=Q8mkrMutsgHQf2ZaJoWc/sSEzefzQFcARyscluV4VzjVVC8xKiZHQLAJlGdD5umqsM nt/TRSriK7EOgWmaQUMQnUvKOtQLuNzQd9xp4vBSwMztbYGnkGfuLpmLXTgAkQcDbe6e AtqtBD0C/1Blgc0TfrGOt+wQ/LHr3X2DzcewZdTlAGRdFDlo+hmakCDM73o9E9Z8NS7B eN/mmWoSPla/vsM9ZHP4p6RcI3OF7CuiJ34I4WS+YlOGgxN6wbCZHBed49qrym+oHlkY +XEwL4V8s9Vat5rRjdxTUYtI+QOorjScfObwDCQHO3gTgQ8tU7LIUSnmnPiuUn/3n1km rwDQ== X-Gm-Message-State: ALyK8tJWq9AxZvdMEggL+R860M0m+yuiNJbSJ1IaHrY6p3FwtQ8TZBNUundpBmTfHVxywaUf X-Received: by 10.66.132.7 with SMTP id oq7mr4272334pab.26.1467930089819; Thu, 07 Jul 2016 15:21:29 -0700 (PDT) Received: from localhost.localdomain (ip68-101-172-78.sd.sd.cox.net. [68.101.172.78]) by smtp.gmail.com with ESMTPSA id j8sm6781807paj.22.2016.07.07.15.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 15:21:29 -0700 (PDT) From: Stephen Boyd To: linux-usb@vger.kernel.org Subject: [PATCH v2 08/22] usb: chipidea: Remove locking in ci_udc_start() Date: Thu, 7 Jul 2016 15:20:59 -0700 Message-Id: <20160707222114.1673-9-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160707222114.1673-1-stephen.boyd@linaro.org> References: <20160707222114.1673-1-stephen.boyd@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160707_152150_514004_18AB8BE5 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felipe Balbi , Arnd Bergmann , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Peter Chen , Greg Kroah-Hartman , Andy Gross , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org We don't call hw_device_reset() with the ci->lock held, so it doesn't seem like this lock here is protecting anything. Let's just remove it. This allows us to call sleeping functions like phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/udc.c | 3 --- 1 file changed, 3 deletions(-) -- 2.9.0.rc2.8.ga28705d _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 065f5d97aa67..f16be4710cdb 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1719,7 +1719,6 @@ static int ci_udc_start(struct usb_gadget *gadget, struct usb_gadget_driver *driver) { struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); - unsigned long flags; int retval = -ENOMEM; if (driver->disconnect == NULL) @@ -1746,7 +1745,6 @@ static int ci_udc_start(struct usb_gadget *gadget, pm_runtime_get_sync(&ci->gadget.dev); if (ci->vbus_active) { - spin_lock_irqsave(&ci->lock, flags); hw_device_reset(ci); } else { usb_udc_vbus_handler(&ci->gadget, false); @@ -1755,7 +1753,6 @@ static int ci_udc_start(struct usb_gadget *gadget, } retval = hw_device_state(ci, ci->ep0out->qh.dma); - spin_unlock_irqrestore(&ci->lock, flags); if (retval) pm_runtime_put_sync(&ci->gadget.dev);