]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
can: c_can: Use of_property_present() to test existence of DT property
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 12 Feb 2025 20:23:14 +0000 (21:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:16 +0000 (11:13 +0200)
[ Upstream commit ab1bc2290fd8311d49b87c29f1eb123fcb581bee ]

of_property_read_bool() should be used only on boolean properties.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://patch.msgid.link/20250212-syscon-phandle-args-can-v2-3-ac9a1253396b@linaro.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/c_can/c_can_platform.c

index 399844809bbeaad42e19b4003b85fc487b01d336..bb6071a758f36502df95431363f6d99c0745340a 100644 (file)
@@ -324,7 +324,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
                /* Check if we need custom RAMINIT via syscon. Mostly for TI
                 * platforms. Only supported with DT boot.
                 */
-               if (np && of_property_read_bool(np, "syscon-raminit")) {
+               if (np && of_property_present(np, "syscon-raminit")) {
                        u32 id;
                        struct c_can_raminit *raminit = &priv->raminit_sys;