All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND/PATCH] usb: host: ehci-tegra: fix PHY error handling
@ 2013-03-21 12:23 Felipe Balbi
       [not found] ` <1363868603-14525-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2013-03-21 12:23 UTC (permalink / raw)
  To: Linux USB Mailing List
  Cc: Alan Stern, swarren-3lzwWm7+Weoh9ZMKESR00Q, Greg KH,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi

PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---

Hi Stephen,

I'm waiting for your topic branch before I can merge
this into my 'next' branch.

cheers

 drivers/usb/host/ehci-tegra.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index fafbc81..1d2488c 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -768,14 +768,12 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 		goto fail;
 	}
 
-#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);
-		if (!IS_ERR_OR_NULL(tegra->transceiver))
+		if (!IS_ERR(tegra->transceiver))
 			otg_set_host(tegra->transceiver->otg, &hcd->self);
 	}
-#endif
 
 	err = usb_add_hcd(hcd, irq, IRQF_SHARED);
 	if (err) {
@@ -794,10 +792,8 @@ static int tegra_ehci_probe(struct platform_device *pdev)
 	return err;
 
 fail:
-#if IS_ENABLED(CONFIG_USB_PHY)
-	if (!IS_ERR_OR_NULL(tegra->transceiver))
+	if (!IS_ERR(tegra->transceiver))
 		otg_set_host(tegra->transceiver->otg, NULL);
-#endif
 	usb_phy_shutdown(hcd->phy);
 fail_io:
 	clk_disable_unprepare(tegra->clk);
@@ -815,10 +811,8 @@ static int tegra_ehci_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 	pm_runtime_put_noidle(&pdev->dev);
 
-#if IS_ENABLED(CONFIG_USB_PHY)
-	if (!IS_ERR_OR_NULL(tegra->transceiver))
+	if (!IS_ERR(tegra->transceiver))
 		otg_set_host(tegra->transceiver->otg, NULL);
-#endif
 
 	usb_phy_shutdown(hcd->phy);
 	usb_remove_hcd(hcd);
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-04-02 18:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 12:23 [RESEND/PATCH] usb: host: ehci-tegra: fix PHY error handling Felipe Balbi
     [not found] ` <1363868603-14525-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-03-21 17:19   ` Stephen Warren
     [not found]     ` <514B4137.2020707-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-21 17:31       ` Felipe Balbi
     [not found]         ` <20130321173100.GB16186-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-03-21 17:37           ` Stephen Warren
     [not found]             ` <514B4544.4090904-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-03-21 18:14               ` Felipe Balbi
2013-04-02  8:36       ` Felipe Balbi
     [not found]         ` <20130402083604.GJ30286-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-04-02 15:33           ` Stephen Warren
     [not found]             ` <515AFA64.3050107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-02 15:44               ` Felipe Balbi
     [not found]                 ` <20130402154410.GL22014-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-04-02 17:39                   ` Sergei Shtylyov
     [not found]                     ` <515B17ED.7010709-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2013-04-02 18:00                       ` Felipe Balbi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.