diff mbox series

phy: amlogic: Replace devm_reset_control_array_get()

Message ID 1605592689-10108-1-git-send-email-yejune.deng@gmail.com (mailing list archive)
State New, archived
Headers show
Series phy: amlogic: Replace devm_reset_control_array_get() | expand

Commit Message

Yejune Deng Nov. 17, 2020, 5:58 a.m. UTC
devm_reset_control_array_get_exclusive() looks more readable

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
 drivers/phy/amlogic/phy-meson-axg-pcie.c       | 2 +-
 drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
 drivers/soc/amlogic/meson-ee-pwrc.c            | 3 +--
 drivers/soc/amlogic/meson-gx-pwrc-vpu.c        | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

Comments

Neil Armstrong Nov. 17, 2020, 8:34 a.m. UTC | #1
On 17/11/2020 06:58, Yejune Deng wrote:
> devm_reset_control_array_get_exclusive() looks more readable
> 
> Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
> ---
>  drivers/phy/amlogic/phy-meson-axg-pcie.c       | 2 +-
>  drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
>  drivers/soc/amlogic/meson-ee-pwrc.c            | 3 +--
>  drivers/soc/amlogic/meson-gx-pwrc-vpu.c        | 2 +-
>  4 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/phy/amlogic/phy-meson-axg-pcie.c b/drivers/phy/amlogic/phy-meson-axg-pcie.c
> index 377ed0d..3204f02 100644
> --- a/drivers/phy/amlogic/phy-meson-axg-pcie.c
> +++ b/drivers/phy/amlogic/phy-meson-axg-pcie.c
> @@ -155,7 +155,7 @@ static int phy_axg_pcie_probe(struct platform_device *pdev)
>  	if (IS_ERR(priv->regmap))
>  		return PTR_ERR(priv->regmap);
>  
> -	priv->reset = devm_reset_control_array_get(dev, false, false);
> +	priv->reset = devm_reset_control_array_get_exclusive(dev);
>  	if (IS_ERR(priv->reset))
>  		return PTR_ERR(priv->reset);
>  
> diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
> index 08e3227..bab6345 100644
> --- a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
> +++ b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
> @@ -418,7 +418,7 @@ static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_disable_clk_ref;
>  
> -	priv->reset = devm_reset_control_array_get(dev, false, false);
> +	priv->reset = devm_reset_control_array_get_exclusive(dev);
>  	if (IS_ERR(priv->reset))
>  		return PTR_ERR(priv->reset);
>  
> diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c
> index ed7d2fb..3a879a4 100644
> --- a/drivers/soc/amlogic/meson-ee-pwrc.c
> +++ b/drivers/soc/amlogic/meson-ee-pwrc.c
> @@ -413,8 +413,7 @@ static int meson_ee_pwrc_init_domain(struct platform_device *pdev,
>  			dev_warn(&pdev->dev, "Invalid resets count %d for domain %s\n",
>  				 count, dom->desc.name);
>  
> -		dom->rstc = devm_reset_control_array_get(&pdev->dev, false,
> -							 false);
> +		dom->rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
>  		if (IS_ERR(dom->rstc))
>  			return PTR_ERR(dom->rstc);
>  	}
> diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> index 8790627..b4615b2 100644
> --- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> +++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
> @@ -304,7 +304,7 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
>  		return PTR_ERR(regmap_hhi);
>  	}
>  
> -	rstc = devm_reset_control_array_get(&pdev->dev, false, false);
> +	rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
>  	if (IS_ERR(rstc)) {
>  		if (PTR_ERR(rstc) != -EPROBE_DEFER)
>  			dev_err(&pdev->dev, "failed to get reset lines\n");
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Martin Blumenstingl Nov. 17, 2020, 10:52 p.m. UTC | #2
Hi Yejune,

On Tue, Nov 17, 2020 at 6:58 AM Yejune Deng <yejune.deng@gmail.com> wrote:
>
> devm_reset_control_array_get_exclusive() looks more readable
>
> Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
> ---
>  drivers/phy/amlogic/phy-meson-axg-pcie.c       | 2 +-
>  drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c | 2 +-
>  drivers/soc/amlogic/meson-ee-pwrc.c            | 3 +--
>  drivers/soc/amlogic/meson-gx-pwrc-vpu.c        | 2 +-
what's the reason behind including PHY and SoC driver changes in one patch?
I think both main directories will be applied by different
maintainers, so I believe the patch should be split into:
- one drivers/phy patch
- another drivers/soc patch


Best regards,
Martin
diff mbox series

Patch

diff --git a/drivers/phy/amlogic/phy-meson-axg-pcie.c b/drivers/phy/amlogic/phy-meson-axg-pcie.c
index 377ed0d..3204f02 100644
--- a/drivers/phy/amlogic/phy-meson-axg-pcie.c
+++ b/drivers/phy/amlogic/phy-meson-axg-pcie.c
@@ -155,7 +155,7 @@  static int phy_axg_pcie_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->regmap))
 		return PTR_ERR(priv->regmap);
 
-	priv->reset = devm_reset_control_array_get(dev, false, false);
+	priv->reset = devm_reset_control_array_get_exclusive(dev);
 	if (IS_ERR(priv->reset))
 		return PTR_ERR(priv->reset);
 
diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
index 08e3227..bab6345 100644
--- a/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
+++ b/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c
@@ -418,7 +418,7 @@  static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_disable_clk_ref;
 
-	priv->reset = devm_reset_control_array_get(dev, false, false);
+	priv->reset = devm_reset_control_array_get_exclusive(dev);
 	if (IS_ERR(priv->reset))
 		return PTR_ERR(priv->reset);
 
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c
index ed7d2fb..3a879a4 100644
--- a/drivers/soc/amlogic/meson-ee-pwrc.c
+++ b/drivers/soc/amlogic/meson-ee-pwrc.c
@@ -413,8 +413,7 @@  static int meson_ee_pwrc_init_domain(struct platform_device *pdev,
 			dev_warn(&pdev->dev, "Invalid resets count %d for domain %s\n",
 				 count, dom->desc.name);
 
-		dom->rstc = devm_reset_control_array_get(&pdev->dev, false,
-							 false);
+		dom->rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
 		if (IS_ERR(dom->rstc))
 			return PTR_ERR(dom->rstc);
 	}
diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
index 8790627..b4615b2 100644
--- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
+++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
@@ -304,7 +304,7 @@  static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
 		return PTR_ERR(regmap_hhi);
 	}
 
-	rstc = devm_reset_control_array_get(&pdev->dev, false, false);
+	rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
 	if (IS_ERR(rstc)) {
 		if (PTR_ERR(rstc) != -EPROBE_DEFER)
 			dev_err(&pdev->dev, "failed to get reset lines\n");