[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1505141152300.1107-100000@iolanthe.rowland.org>
Date: Thu, 14 May 2015 11:55:36 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Rob Herring <robh@...nel.org>
cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kishon Vijay Abraham I <kishon@...com>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 5/5] usb: add pxa1928 ehci support
On Wed, 13 May 2015, Rob Herring wrote:
> Add platform driver for Marvell PXA1928 SOC. This is different from the
> mv-ehci driver in that it uses the generic phy framework, uses DT, does
> not use platform_data, is host only, and has a specific HSIC PHY and
> controller initialization handshake.
One more thing, which I had intended to include in my earlier review
but then forgot about...
> +static int mv_ehci_probe(struct platform_device *pdev)
> +{
...
> + hcd->phy = devm_of_phy_get(&pdev->dev, pdev->dev.of_node, NULL);
> + if (IS_ERR_OR_NULL(hcd->phy)) {
> + retval = PTR_ERR(hcd->phy);
> + if (retval != -EPROBE_DEFER && retval != -ENODEV)
> + dev_err(&pdev->dev, "failed to get the phy\n");
> + else
> + return -EPROBE_DEFER;
> + goto err_put_hcd;
> + }
Please straighten out this convoluted logic. It should go like this:
hcd->phy = devm_of_phy_get(&pdev->dev, pdev->dev.of_node, NULL);
if (IS_ERR_OR_NULL(hcd->phy)) {
retval = PTR_ERR(hcd->phy);
if (retval == -EPROBE_DEFER || retval == -ENODEV)
return -EPROBE_DEFER;
dev_err(&pdev->dev, "failed to get the phy\n");
goto err_put_hcd;
}
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists