pmdomain: imx: gpcv2: use proper helper for property detection
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Tue, 18 Feb 2025 19:18:32 +0000 (20:18 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 19 Feb 2025 11:59:09 +0000 (12:59 +0100)
Starting with commit c141ecc3cecd7 ("of: Warn when of_property_read_bool()
is used on non-boolean properties"), probing the gpcv2 device on i.MX8M
SoCs leads to warnings when LOCKDEP is enabled.

Fix this by checking property presence with of_property_present as
intended.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.kernel.org/r/20250218-gpcv2-of-property-present-v1-1-3bb1a9789654@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/imx/gpcv2.c

index 958d34d4821b1be68d730ad345037b8f0a56c45a..105fcaf13a34c787b2d568bc64e7fee9bfc23393 100644 (file)
@@ -1361,7 +1361,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
        }
 
        if (IS_ENABLED(CONFIG_LOCKDEP) &&
-           of_property_read_bool(domain->dev->of_node, "power-domains"))
+           of_property_present(domain->dev->of_node, "power-domains"))
                lockdep_set_subclass(&domain->genpd.mlock, 1);
 
        ret = of_genpd_add_provider_simple(domain->dev->of_node,