提交 7db71a9a 编写于 作者: T Tuomas Tynkkynen 提交者: Felipe Balbi

usb: host: tegra: Locate a PHY via standard API

Use devm_get_phy_by_phandle to get a PHY device instead of the custom
Tegra functions.
Signed-off-by: NTuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-by: NStephen Warren <swarren@nvidia.com>
Tested-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 0ee5b4ab
......@@ -328,7 +328,6 @@ static int tegra_ehci_probe(struct platform_device *pdev)
struct tegra_ehci_hcd *tegra;
int err = 0;
int irq;
struct device_node *np_phy;
struct usb_phy *u_phy;
/* Right now device-tree probed devices don't get dma_mask set.
......@@ -367,13 +366,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
udelay(1);
tegra_periph_reset_deassert(tegra->clk);
np_phy = of_parse_phandle(pdev->dev.of_node, "nvidia,phy", 0);
if (!np_phy) {
err = -ENODEV;
goto cleanup_clk_en;
}
u_phy = tegra_usb_get_phy(np_phy);
u_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0);
if (IS_ERR(u_phy)) {
err = PTR_ERR(u_phy);
goto cleanup_clk_en;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册