linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
@ 2014-07-08 10:14 Markus Pargmann
  2014-07-08 10:14 ` [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required Markus Pargmann
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Pargmann @ 2014-07-08 10:14 UTC (permalink / raw)
  To: linux-arm-kernel

-ENODEV is interpreted by the generic driver probing function as a
non-matching driver. This leads to a missing probe failure message.

Also a missing USB PHY is more of an invalid configuration of the usb
driver because it is necessary.

This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 2e58f8dfd311..65444b02bd68 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -133,6 +133,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
 	data->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0);
 	if (IS_ERR(data->phy)) {
 		ret = PTR_ERR(data->phy);
+		/* Return -EINVAL if no usbphy is available */
+		if (ret == -ENODEV)
+			ret = -EINVAL;
 		goto err_clk;
 	}
 
-- 
2.0.0

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

end of thread, other threads:[~2014-07-09  7:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 10:14 [PATCH 1/2] usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY Markus Pargmann
2014-07-08 10:14 ` [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required Markus Pargmann
2014-07-08 16:28   ` Sergei Shtylyov
2014-07-09  7:26     ` Markus Pargmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).