ARM: imx: Use of_property_read_bool() for boolean properties
authorRob Herring <robh@kernel.org>
Fri, 10 Mar 2023 14:46:55 +0000 (08:46 -0600)
committerShawn Guo <shawnguo@kernel.org>
Tue, 14 Mar 2023 07:06:00 +0000 (15:06 +0800)
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to to of_property_read_bool().

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/gpc.c

index ebc4339b8be48797e6923536909bf7810a02de76..5909088d54822d728e3e2f37c4156d930702dc12 100644 (file)
@@ -275,7 +275,7 @@ void __init imx_gpc_check_dt(void)
        if (WARN_ON(!np))
                return;
 
-       if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
+       if (WARN_ON(!of_property_read_bool(np, "interrupt-controller"))) {
                pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
 
                /* map GPC, so that at least CPUidle and WARs keep working */