From patchwork Fri Mar 15 09:12:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 227891 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DA3982C00DC for ; Fri, 15 Mar 2013 20:12:33 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753976Ab3COJMc (ORCPT ); Fri, 15 Mar 2013 05:12:32 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:39411 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753963Ab3COJMa (ORCPT ); Fri, 15 Mar 2013 05:12:30 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2F9CTNv006749; Fri, 15 Mar 2013 04:12:29 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2F9CT0K014027; Fri, 15 Mar 2013 04:12:29 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 15 Mar 2013 04:12:29 -0500 Received: from localhost (h78-5.vpn.ti.com [172.24.78.5]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2F9CSvJ028177; Fri, 15 Mar 2013 04:12:28 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Alan Stern , , Greg KH , , Felipe Balbi Subject: [PATCH 8/9] usb: host: ehci-tegra: fix PHY error handling Date: Fri, 15 Mar 2013 11:12:09 +0200 Message-ID: <1363338730-14581-9-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1363338730-14581-1-git-send-email-balbi@ti.com> References: <1363338730-14581-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org PHY layer no longer returns NULL, we must switch from IS_ERR_OR_NULL() to IS_ERR(). Signed-off-by: Felipe Balbi --- 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);