ath79: phy-ar7200-usb: do not print error on defered init

This is only a cosmetic correction, as the driver works as expected.
However, the error message confuses users about a missing reset definition.

On a defered init we don't see the following error message now:
[    0.078292] ar7200-usb-phy usb-phy: phy reset is missing

Tested-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
master
Johann Neuhauser 4 years ago committed by Petr Štetiar
parent 880c1f0336
commit 1d9812f48a

@ -194,7 +194,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
--- /dev/null --- /dev/null
+++ b/drivers/phy/phy-ar7200-usb.c +++ b/drivers/phy/phy-ar7200-usb.c
@@ -0,0 +1,135 @@ @@ -0,0 +1,136 @@
+/* +/*
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr> + * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
+ * + *
@ -265,7 +265,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ +
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); + priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
+ if (IS_ERR(priv->rst_phy)) { + if (IS_ERR(priv->rst_phy)) {
+ dev_err(&pdev->dev, "phy reset is missing\n"); + if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ return PTR_ERR(priv->rst_phy); + return PTR_ERR(priv->rst_phy);
+ } + }
+ +

@ -194,7 +194,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
--- /dev/null --- /dev/null
+++ b/drivers/phy/phy-ar7200-usb.c +++ b/drivers/phy/phy-ar7200-usb.c
@@ -0,0 +1,135 @@ @@ -0,0 +1,136 @@
+/* +/*
+ * Copyright (C) 2015 Alban Bedel <albeu@free.fr> + * Copyright (C) 2015 Alban Bedel <albeu@free.fr>
+ * + *
@ -265,7 +265,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ +
+ priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy"); + priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
+ if (IS_ERR(priv->rst_phy)) { + if (IS_ERR(priv->rst_phy)) {
+ dev_err(&pdev->dev, "phy reset is missing\n"); + if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "phy reset is missing\n");
+ return PTR_ERR(priv->rst_phy); + return PTR_ERR(priv->rst_phy);
+ } + }
+ +

Loading…
Cancel
Save