Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757806Ab3GYSij (ORCPT ); Thu, 25 Jul 2013 14:38:39 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:4266 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757580Ab3GYSid (ORCPT ); Thu, 25 Jul 2013 14:38:33 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 25 Jul 2013 11:37:21 -0700 From: Tuomas Tynkkynen To: CC: , , , , , Tuomas Tynkkynen Subject: [PATCH v3 6/9] usb: host: tegra: Locate a PHY via standard API Date: Thu, 25 Jul 2013 21:38:06 +0300 Message-ID: <1374777489-13093-7-git-send-email-ttynkkynen@nvidia.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1374777489-13093-1-git-send-email-ttynkkynen@nvidia.com> References: <1374777489-13093-1-git-send-email-ttynkkynen@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1476 Lines: 45 Use devm_get_phy_by_phandle to get a PHY device instead of the custom Tegra functions. Signed-off-by: Tuomas Tynkkynen Reviewed-by: Stephen Warren Tested-by: Stephen Warren --- drivers/usb/host/ehci-tegra.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index a208cea..db8031f 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -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; -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/