summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVenu Byravarasu <vbyravarasu@nvidia.com>2012-06-07 14:55:04 +0530
committerSimone Willett <swillett@nvidia.com>2012-06-07 17:55:20 -0700
commit3e3a0afe6b1f44e36043dd87fee2331fa0f16dd6 (patch)
tree559c7b5bda2f51cfc14c1227ef2a4882a9bef991 /arch
parent408859877e6cc97e1648262bfe066f87fec81957 (diff)
arm: tegra: usb: Fixing phy close sequence
bug 947300 Change-Id: I1f696030adbdc79d08b30783565d9b195f9e2891 Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-on: http://git-master/r/106981 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/usb_phy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index dfbd621428fb..041a5434ca03 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -379,6 +379,12 @@ void tegra_usb_phy_close(struct tegra_usb_phy *phy)
{
DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
+ if (phy->ops && phy->ops->close)
+ phy->ops->close(phy);
+
+ if (phy->pdata->ops && phy->pdata->ops->close)
+ phy->pdata->ops->close();
+
if (phy->pdata->op_mode == TEGRA_USB_OPMODE_DEVICE) {
if (phy->pdata->u_data.dev.vbus_pmu_irq)
free_irq(phy->pdata->u_data.dev.vbus_pmu_irq, phy);
@@ -403,11 +409,6 @@ void tegra_usb_phy_close(struct tegra_usb_phy *phy)
regulator_put(phy->vdd_reg);
}
- if (phy->ops && phy->ops->close)
- phy->ops->close(phy);
-
- if (phy->pdata->ops && phy->pdata->ops->close)
- phy->pdata->ops->close();
tegra_usb_phy_release_clocks(phy);