From patchwork Sat Oct 13 13:50:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 1589151 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 00B253FD9C for ; Sat, 13 Oct 2012 13:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752943Ab2JMNo6 (ORCPT ); Sat, 13 Oct 2012 09:44:58 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:20626 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925Ab2JMNo6 (ORCPT ); Sat, 13 Oct 2012 09:44:58 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBU002DL3IWCFD0@mailout1.samsung.com>; Sat, 13 Oct 2012 22:44:56 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5D.95.07865.85079705; Sat, 13 Oct 2012 22:44:56 +0900 (KST) X-AuditID: cbfee61a-b7f976d000001eb9-61-507970580b60 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0D.95.07865.85079705; Sat, 13 Oct 2012 22:44:56 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.73.134]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MBU00D6U3IMWYA0@mmp1.samsung.com>; Sat, 13 Oct 2012 22:44:56 +0900 (KST) From: Vivek Gautam To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Cc: gregkh@linuxfoundation.org, balbi@ti.com, rob.herring@calxeda.com Subject: [PATCH] USB: DWC3: Shutdown usb_phy when removing the device Date: Sat, 13 Oct 2012 19:20:18 +0530 Message-id: <1350136218-25678-1-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsWyRsSkWjeioDLAYOssNYvZS/pZLBYta2V2 YPL4vEkugDGKyyYlNSezLLVI3y6BK+PJnnlMBVdZK75tX83cwHifpYuRk0NCwETizqovULaY xIV769m6GLk4hASWMkqcOLKHFaaof+8BdojEIkaJc2eOQVVNZpJ4duMJG0gVm4CuRNPbXYwg toiApcTZlo1MXYwcHMwCrhIrTkuDhIWBzJaZn1lBwiwCqhJXT6mAhHkFPCTetv5khtilIPHm 9jMwm0VAQOLb5EMsIOUSArISmw5Alexhk+i8zwVhS0ocXHGDZQKj4AJGhlWMoqkFyQXFSem5 hnrFibnFpXnpesn5uZsYgYF1+t8zqR2MKxssDjEKcDAq8fDe7K4IEGJNLCuuzD3EKMHBrCTC +yqvMkCINyWxsiq1KD++qDQntfgQow/QIROZpUST84FBn1cSb2hsYm5qbGppZGRmaopDWEmc t9kjJUBIID2xJDU7NbUgtQhmHBMHp1QDo9739wm8/2rDLxxfOfXr124ZyfzAFfN37C58GpZX mtKwwDHyzuuf+t6z+pcuqZi/8Mn2CzMbJDVmBfBaR51hfH9M9IPLb4Zzq5ZK3HsvF8Lsu5Nl +q2Lx1qWHRe6P3PzU2uT5MBIF0n9vpWcjIGPrR6cYFqnv/LTsoM5DdsXv5+quX3vrKsvDiYo sRRnJBpqMRcVJwIAmhSHaVkCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsVy+t9jAd2IgsoAg9lnpSxmL+lnsVi0rJXZ gcnj8ya5AMaoBkabjNTElNQihdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58A XbfMHKDRSgpliTmlQKGAxOJiJX07TBNCQ9x0LWAaI3R9Q4LgeowM0EDCGsaMJ3vmMRVcZa34 tn01cwPjfZYuRk4OCQETif69B9ghbDGJC/fWs3UxcnEICSxilDh35hiUM5lJ4tmNJ2wgVWwC uhJNb3cxgtgiApYSZ1s2MnUxcnAwC7hKrDgtDRIWBjJbZn5mBQmzCKhKXD2lAhLmFfCQeNv6 kxlil4LEm9vPmCcwci9gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJERy4z6R2MK5ssDjE KMDBqMTDe7O7IkCINbGsuDL3EKMEB7OSCO+rvMoAId6UxMqq1KL8+KLSnNTiQ4w+QMsnMkuJ JucDoyqvJN7Q2MTc1NjU0sTCxMwSh7CSOG+zR0qAkEB6YklqdmpqQWoRzDgmDk6pBsZEg2+r 75Q08K4oiN8fOEdxYaLSfX/GzHdrOqLFbpgbmNQt42+Zc2qFpnaMhb6/olZgL+OJRQe+f7mY aM9SpZXzUPLyHivxv1XNLAdd/B6K71hRM0fR29Egell2n+t6rnXT5V9J9R6sCSoTz7x+z9Zc UXz7hvO8XjM4WnS4nR228/uWnQ1kV2Ipzkg01GIuKk4EAH8HVdWJAgAA X-CFilter-Loop: Reflected Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org We do usb_phy_init() while doing core_init() in probe, so adding usb_phy_shutdown() when we do core_exit() while removing the device. Signed-off-by: Vivek Gautam --- drivers/usb/dwc3/core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b415c0c..c14ebc9 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -409,6 +409,10 @@ static void dwc3_core_exit(struct dwc3 *dwc) { dwc3_event_buffers_cleanup(dwc); dwc3_free_event_buffers(dwc); + + usb_phy_shutdown(dwc->usb2_phy); + usb_phy_shutdown(dwc->usb3_phy); + } #define DWC3_ALIGN_MASK (16 - 1)