From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Linux USB Mailing List
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
Greg KH
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Subject: [RESEND/PATCH] usb: host: ehci-tegra: fix PHY error handling
Date: Thu, 21 Mar 2013 14:23:23 +0200 [thread overview]
Message-ID: <1363868603-14525-1-git-send-email-balbi@ti.com> (raw)
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
next reply other threads:[~2013-03-21 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:23 Felipe Balbi [this message]
[not found] ` <1363868603-14525-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-03-21 17:19 ` [RESEND/PATCH] usb: host: ehci-tegra: fix PHY error handling 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363868603-14525-1-git-send-email-balbi@ti.com \
--to=balbi-l0cymroini0@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox