diff options
Diffstat (limited to 'drivers/usb/otg/tegra-otg.c')
-rw-r--r-- | drivers/usb/otg/tegra-otg.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index a063630e529d..d23356e9c1a7 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -324,6 +324,8 @@ static int tegra_otg_set_suspend(struct otg_transceiver *otg, int suspend) static int tegra_otg_probe(struct platform_device *pdev) { struct tegra_otg_data *tegra; + struct tegra_otg_platform_data *otg_pdata; + struct tegra_ehci_platform_data *ehci_pdata; struct resource *res; int err; @@ -332,6 +334,8 @@ static int tegra_otg_probe(struct platform_device *pdev) return -ENOMEM; tegra->otg.dev = &pdev->dev; + otg_pdata = tegra->otg.dev->platform_data; + ehci_pdata = otg_pdata->ehci_pdata; tegra->otg.label = "tegra-otg"; tegra->otg.state = OTG_STATE_UNDEFINED; tegra->otg.set_host = tegra_otg_set_host; @@ -391,9 +395,8 @@ static int tegra_otg_probe(struct platform_device *pdev) } INIT_WORK (&tegra->work, irq_work); -#ifndef CONFIG_USB_HOTPLUG - clk_disable(tegra->clk); -#endif + if (!ehci_pdata->default_enable) + clk_disable(tegra->clk); dev_info(&pdev->dev, "otg transceiver registered\n"); return 0; |