From patchwork Wed May 18 21:24:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102319 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2858875qge; Wed, 18 May 2016 14:26:06 -0700 (PDT) X-Received: by 10.66.6.98 with SMTP id z2mr13981156paz.95.1463606766534; Wed, 18 May 2016 14:26:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fc1si14519305pab.126.2016.05.18.14.26.06; Wed, 18 May 2016 14:26:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754240AbcERV0D (ORCPT + 29 others); Wed, 18 May 2016 17:26:03 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:57383 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbcERVY4 (ORCPT ); Wed, 18 May 2016 17:24:56 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MCMK5-1aueVs30HR-0097uo; Wed, 18 May 2016 23:24:41 +0200 From: Arnd Bergmann To: Felipe Balbi Cc: Arnd Bergmann , Andy Gross , David Brown , Peter Chen , Greg Kroah-Hartman , Alan Stern , Mark Brown , Bjorn Andersson , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-usb@vger.kernel.org Subject: [RFC 8/8] usb: phy: msm: disable regulator for remove() Date: Wed, 18 May 2016 23:24:13 +0200 Message-Id: <1463606653-325131-9-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1463606653-325131-1-git-send-email-arnd@arndb.de> References: <1463606653-325131-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:hDBztP+e8k67vs6FqcSRTzxf+yXqpZlDzU0FtZpDThg7ELAQkTt z/zEJ/+VHGl29AYokm71XxuTJWHEY3C2naBZgVgM/pp89i+mlkDdIwGc2Xi1ecVqsEcrMKp hIG4tiFrMYHghe6XKCmDPPGkvtQ6Ii+QvDZSBdDjst5mIEeRs0fM6xQRNKDZqOXk0ilRF4G fDyQVs+ioHyxZQpLOSvPA== X-UI-Out-Filterresults: notjunk:1; V01:K0:gJJbgVU9ac0=:L4cjuY58zHjaPmsRXaND7C /sQOGM3yyFY7w3nTRJeN+aqdlLHEz5DGY4Jg4di8p4pdqeBktzS2gES6IYrUKm6HmCfkwKhhC nak6/yCDwdF7Y84mYmvFHoNOqKFE8psLa87jpsjQQl9G6JTSfyxAKXIliSCC0OpKgQmbPzlGu 21IO0mZsziD7skYfDGhGAUif7MXCIPXeHuUFA++QdX+kaxVwvyf0ejq6cRTgEGVkvVK8kJMJS kq/d5tSj9d9qJG6F/o+X5Zn5hJmRwrvmfxQt5jHF4VEW3EW5bX6Jga264bcazNdUXID/nyzZU ozYEKak2IOSLEhPeVEnTlWTuTBDzCMknFdirW7anlwR9Q8QtCev7y2oI4L+BiS6RWFCWo9AZs qcBMl04mslviwj11d6JfkDmWu6J8e9sMhdLRW9x7jiWYL4h54rRO0DmCPVOUDmwEcUfhAZkDL +6GWAQca0TefABrcczIA6+8tSXWjE7nEHw8qQuh3wDiM/8h8SaxnirvDqD0kDuiacI87WngRe bHt5W6dza29QP8qGm3u7BfUFfq5ecp2ttcDHwzfkxZDCTMDhEr5baT9Q/8wU70pQ+sKJCAZkl tp9YJ0PGsaoP/0L1LLUKqqN87IBzaoWGaZo5+/m5q5CJkIH9HKQuxaGSlqBb5+1sBq4jlQU24 9ms/nRAuVvdeGEJqqnPiXXM2350GwPZUjDJdb00z8+/PW1wesnur+9ulZAG7nHIgkXYw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems odd that this driver explicitly enables the vddcx regulator on probe along with the other regulators, but doesn't disable it again when the device is removed. This changes the remove callback to handle all three regulators the same way and disable them in the end. Signed-off-by: Arnd Bergmann --- drivers/usb/phy/phy-msm-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.0 diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 570fd3433937..48fe48e5bf6d 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -2030,8 +2030,7 @@ static int msm_otg_remove(struct platform_device *pdev) clk_disable_unprepare(motg->clk); if (!IS_ERR(motg->core_clk)) clk_disable_unprepare(motg->core_clk); - /* vddcx is left active */ - regulator_bulk_disable(2, &motg->regulators[V3P3]); + regulator_bulk_disable(ARRAY_SIZE(motg->regulators), motg->regulators); pm_runtime_set_suspended(&pdev->dev);