Skip to content

Commit

Permalink
usb: ehci: tegra: check against CONFIG_USB_PHY
Browse files Browse the repository at this point in the history
CONFIG_USB_OTG_UTILS will be removed very
soon, so we should check CONFIG_USB_PHY
instead.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent fcd12b9 commit a948712
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/host/ehci-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
goto fail;
}

#ifdef CONFIG_USB_OTG_UTILS
#if IS_ENABLED(CONFIG_USB_PHY)
if (pdata->operating_mode == TEGRA_USB_OTG) {
tegra->transceiver =
devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
Expand All @@ -794,7 +794,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
return err;

fail:
#ifdef CONFIG_USB_OTG_UTILS
#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(tegra->transceiver))
otg_set_host(tegra->transceiver->otg, NULL);
#endif
Expand All @@ -815,7 +815,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
pm_runtime_put_noidle(&pdev->dev);

#ifdef CONFIG_USB_OTG_UTILS
#if IS_ENABLED(CONFIG_USB_PHY)
if (!IS_ERR_OR_NULL(tegra->transceiver))
otg_set_host(tegra->transceiver->otg, NULL);
#endif
Expand Down

0 comments on commit a948712

Please sign in to comment.