diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2012-08-08 14:14:53 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-08-10 12:41:20 +0530 |
commit | 9f30fcdc239d363964a38e9279ce3b1e950761f8 (patch) | |
tree | 6f63daa6846d30d3e86b63683a518c7d61c42970 | |
parent | dcf8dd248b3d28ec6af8c6cb776a7123c0f26903 (diff) |
usb: gadget: tegra: fix compilation issue
Fixing the potential compilation this is
currently masked as CONFIG_USB_OTG_UTILS
is enabled.
Change-Id: Ie10e5fc252156b8b904d387d87a11136fcc3f4c1
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/122043
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
-rw-r--r-- | drivers/usb/gadget/tegra_udc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/tegra_udc.c b/drivers/usb/gadget/tegra_udc.c index 9a8b372492cd..dc8d97cf8060 100644 --- a/drivers/usb/gadget/tegra_udc.c +++ b/drivers/usb/gadget/tegra_udc.c @@ -2682,6 +2682,12 @@ static int __init tegra_udc_probe(struct platform_device *pdev) otg_set_peripheral(udc->transceiver->otg, &udc->gadget); } +#ifndef CONFIG_USB_OTG_UTILS + /* Power down the phy if cable is not connected */ + if (!vbus_enabled(udc)) + tegra_usb_phy_power_off(udc->phy); +#endif + DBG("%s(%d) END\n", __func__, __LINE__); return 0; |