]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: gadget: tegra: fix compilation issue
authorRakesh Bodla <rbodla@nvidia.com>
Wed, 8 Aug 2012 08:44:53 +0000 (14:14 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:31:26 +0000 (12:31 -0700)
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>
Rebase-Id: R3f48abadd449cb7d885cd83f02397b84dbb600f3

drivers/usb/gadget/tegra_udc.c

index 9a8b372492cd1e8355932db79e532d980b213600..dc8d97cf8060513bfd23c3102f7e187028cdc1fe 100644 (file)
@@ -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;