public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pmdomain: imx: Use of_property_present() for non-boolean properties
@ 2024-11-04 19:07 Rob Herring (Arm)
  2024-11-12 15:56 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2024-11-04 19:07 UTC (permalink / raw)
  To: Ulf Hansson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: linux-pm, imx, linux-arm-kernel, linux-kernel

The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/pmdomain/imx/gpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c
index 80a4dcc77199..fbb4c90b72c4 100644
--- a/drivers/pmdomain/imx/gpc.c
+++ b/drivers/pmdomain/imx/gpc.c
@@ -411,7 +411,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
 	pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
 
 	/* bail out if DT too old and doesn't provide the necessary info */
-	if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") &&
+	if (!of_property_present(pdev->dev.of_node, "#power-domain-cells") &&
 	    !pgc_node)
 		return 0;
 
@@ -511,7 +511,7 @@ static void imx_gpc_remove(struct platform_device *pdev)
 	pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
 
 	/* bail out if DT too old and doesn't provide the necessary info */
-	if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") &&
+	if (!of_property_present(pdev->dev.of_node, "#power-domain-cells") &&
 	    !pgc_node)
 		return;
 
-- 
2.45.2


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

* Re: [PATCH] pmdomain: imx: Use of_property_present() for non-boolean properties
  2024-11-04 19:07 [PATCH] pmdomain: imx: Use of_property_present() for non-boolean properties Rob Herring (Arm)
@ 2024-11-12 15:56 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2024-11-12 15:56 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	linux-pm, imx, linux-arm-kernel, linux-kernel

On Mon, 4 Nov 2024 at 20:07, Rob Herring (Arm) <robh@kernel.org> wrote:
>
> The use of of_property_read_bool() for non-boolean properties is
> deprecated in favor of of_property_present() when testing for property
> presence.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/pmdomain/imx/gpc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c
> index 80a4dcc77199..fbb4c90b72c4 100644
> --- a/drivers/pmdomain/imx/gpc.c
> +++ b/drivers/pmdomain/imx/gpc.c
> @@ -411,7 +411,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
>         pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
>
>         /* bail out if DT too old and doesn't provide the necessary info */
> -       if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") &&
> +       if (!of_property_present(pdev->dev.of_node, "#power-domain-cells") &&
>             !pgc_node)
>                 return 0;
>
> @@ -511,7 +511,7 @@ static void imx_gpc_remove(struct platform_device *pdev)
>         pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
>
>         /* bail out if DT too old and doesn't provide the necessary info */
> -       if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") &&
> +       if (!of_property_present(pdev->dev.of_node, "#power-domain-cells") &&
>             !pgc_node)
>                 return;
>
> --
> 2.45.2
>

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

end of thread, other threads:[~2024-11-12 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 19:07 [PATCH] pmdomain: imx: Use of_property_present() for non-boolean properties Rob Herring (Arm)
2024-11-12 15:56 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox