summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-05-17 21:06:42 -0700
committerGary King <gking@nvidia.com>2010-05-17 21:14:17 -0700
commit73c7b9730c740ccf34c4e080653f5cdfaa8680de (patch)
tree10ebfef15507a87555c753bf56913de346751b3c
parentb42da727f2243bad6801adb704fedaf16fa8fb7f (diff)
[ARM/tegra] usbphy: partial revert of assignment != comparison
the assignment to hDdkUsbPhy->IsHostMode was intentional; rewrite the code to make this clearer Change-Id: Ifc881397c240049b7c0a4300ae3267be397bfda5 Reviewed-on: http://git-master/r/1420 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
-rwxr-xr-xarch/arm/mach-tegra/nvddk/nvddk_usbphy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
index d7119d51cca3..5d2dc57f3acf 100755
--- a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
+++ b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
@@ -678,7 +678,8 @@ NvDdkUsbPhyPowerUp(
hUsbPhy->RestoreContext(hUsbPhy);
}
- if (hUsbPhy->IsHostMode == IsHostMode)
+ hUsbPhy->IsHostMode = IsHostMode;
+ if (IsHostMode)
{
UsbPrivEnableVbus(hUsbPhy, NV_TRUE);
}
@@ -720,7 +721,8 @@ NvDdkUsbPhyPowerDown(
}
/* Turn on/off the vbus for host mode */
- if (hUsbPhy->IsHostMode == IsHostMode)
+ hUsbPhy->IsHostMode = IsHostMode;
+ if (IsHostMode)
{
UsbPrivEnableVbus(hUsbPhy, NV_FALSE);
}