Skip to contentSkip to conversation

pmdomain: imx: Use of_property_present() for non-boolean properties

PATCH In review Rob Herring (Arm) 2 participants 2 messages Nov 4, 2024 – Nov 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pmdomain: imx: Use of_property_present() for non-boolean properties

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

---
 drivers/pmdomain/imx/gpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pmdomain/imx/gpc.c +2 -2
index 80a4dcc77199..fbb4c90b72c4 100644
@@ -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;
 
Signature · 1 line
2.45.2
#1 lore raw
Quoted 6 lines · Rob Herring (Arm)

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

Applied for next, thanks!

Kind regards
Uffe

Quoted 29 lines
---
 drivers/pmdomain/imx/gpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pmdomain/imx/gpc.c +2 -3
index 80a4dcc77199..fbb4c90b72c4 100644
@@ -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