linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: stm32: adopt dev_err_probe for regulators
@ 2021-10-25 14:31 Fabrice Gasnier
  2021-10-26 15:50 ` Amelie DELAUNAY
  2021-11-23  5:19 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Gasnier @ 2021-10-25 14:31 UTC (permalink / raw)
  To: vkoul, kishon
  Cc: amelie.delaunay, alexandre.torgue, linux-phy, linux-stm32,
	linux-arm-kernel, linux-kernel

Change stm32-usbphyc driver to use dev_err_probe(), to benefit of
devices_deferred debugfs in case of probe deferral.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
 drivers/phy/st/phy-stm32-usbphyc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
index 7df6a63..115be0e 100644
--- a/drivers/phy/st/phy-stm32-usbphyc.c
+++ b/drivers/phy/st/phy-stm32-usbphyc.c
@@ -672,17 +672,15 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
 
 	usbphyc->vdda1v1 = devm_regulator_get(dev, "vdda1v1");
 	if (IS_ERR(usbphyc->vdda1v1)) {
-		ret = PTR_ERR(usbphyc->vdda1v1);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to get vdda1v1 supply: %d\n", ret);
+		ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v1),
+				    "failed to get vdda1v1 supply\n");
 		goto clk_disable;
 	}
 
 	usbphyc->vdda1v8 = devm_regulator_get(dev, "vdda1v8");
 	if (IS_ERR(usbphyc->vdda1v8)) {
-		ret = PTR_ERR(usbphyc->vdda1v8);
-		if (ret != -EPROBE_DEFER)
-			dev_err(dev, "failed to get vdda1v8 supply: %d\n", ret);
+		ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v8),
+				    "failed to get vdda1v8 supply\n");
 		goto clk_disable;
 	}
 
-- 
2.7.4


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

* Re: [PATCH] phy: stm32: adopt dev_err_probe for regulators
  2021-10-25 14:31 [PATCH] phy: stm32: adopt dev_err_probe for regulators Fabrice Gasnier
@ 2021-10-26 15:50 ` Amelie DELAUNAY
  2021-11-23  5:19 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Amelie DELAUNAY @ 2021-10-26 15:50 UTC (permalink / raw)
  To: Fabrice Gasnier, vkoul, kishon
  Cc: alexandre.torgue, linux-phy, linux-stm32, linux-arm-kernel, linux-kernel

Hi Fabrice,

Thanks for your patch.

On 10/25/21 4:31 PM, Fabrice Gasnier wrote:
> Change stm32-usbphyc driver to use dev_err_probe(), to benefit of
> devices_deferred debugfs in case of probe deferral.
>  > Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

> ---
>   drivers/phy/st/phy-stm32-usbphyc.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
> index 7df6a63..115be0e 100644
> --- a/drivers/phy/st/phy-stm32-usbphyc.c
> +++ b/drivers/phy/st/phy-stm32-usbphyc.c
> @@ -672,17 +672,15 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
>   
>   	usbphyc->vdda1v1 = devm_regulator_get(dev, "vdda1v1");
>   	if (IS_ERR(usbphyc->vdda1v1)) {
> -		ret = PTR_ERR(usbphyc->vdda1v1);
> -		if (ret != -EPROBE_DEFER)
> -			dev_err(dev, "failed to get vdda1v1 supply: %d\n", ret);
> +		ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v1),
> +				    "failed to get vdda1v1 supply\n");
>   		goto clk_disable;
>   	}
>   
>   	usbphyc->vdda1v8 = devm_regulator_get(dev, "vdda1v8");
>   	if (IS_ERR(usbphyc->vdda1v8)) {
> -		ret = PTR_ERR(usbphyc->vdda1v8);
> -		if (ret != -EPROBE_DEFER)
> -			dev_err(dev, "failed to get vdda1v8 supply: %d\n", ret);
> +		ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v8),
> +				    "failed to get vdda1v8 supply\n");
>   		goto clk_disable;
>   	}
>   
> 

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

* Re: [PATCH] phy: stm32: adopt dev_err_probe for regulators
  2021-10-25 14:31 [PATCH] phy: stm32: adopt dev_err_probe for regulators Fabrice Gasnier
  2021-10-26 15:50 ` Amelie DELAUNAY
@ 2021-11-23  5:19 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2021-11-23  5:19 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: kishon, amelie.delaunay, alexandre.torgue, linux-phy,
	linux-stm32, linux-arm-kernel, linux-kernel

On 25-10-21, 16:31, Fabrice Gasnier wrote:
> Change stm32-usbphyc driver to use dev_err_probe(), to benefit of
> devices_deferred debugfs in case of probe deferral.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2021-11-23  5:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 14:31 [PATCH] phy: stm32: adopt dev_err_probe for regulators Fabrice Gasnier
2021-10-26 15:50 ` Amelie DELAUNAY
2021-11-23  5:19 ` Vinod Koul

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).