[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1463606653-325131-9-git-send-email-arnd@arndb.de>
Date: Wed, 18 May 2016 23:24:13 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Felipe Balbi <balbi@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Andy Gross <andy.gross@...aro.org>,
David Brown <david.brown@...aro.org>,
Peter Chen <Peter.Chen@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
Mark Brown <broonie@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-soc@...r.kernel.org, linux-usb@...r.kernel.org
Subject: [RFC 8/8] usb: phy: msm: disable regulator for remove()
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 <arnd@...db.de>
---
drivers/usb/phy/phy-msm-usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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);
--
2.7.0
Powered by blists - more mailing lists