From: Rob Herring (Arm) Date: Mon, 4 Nov 2024 19:07:42 +0000 (-0600) Subject: pmdomain: imx: Use of_property_present() for non-boolean properties X-Git-Tag: v6.13-rc1~154^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d04dfdbc380d1b77d4312f9e6d2ac1b42598fed;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Rob Herring (Arm) Message-ID: <20241104190742.276710-1-robh@kernel.org> Signed-off-by: Ulf Hansson --- diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c index 80a4dcc77199c..fbb4c90b72c49 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;