Netdev List
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de, bui duc phuc <phucduc.bui@gmail.com>,
	Kendall Willis <k-willis@ti.com>,
	Markus Schneider-Pargmann <msp@baylibre.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 09/11] can: m_can: Use of_property_present() for wakeup-source
Date: Tue, 18 Aug 2026 01:24:36 +0200	[thread overview]
Message-ID: <20260817233420.2068204-10-mkl@pengutronix.de> (raw)
In-Reply-To: <20260817233420.2068204-1-mkl@pengutronix.de>

From: bui duc phuc <phucduc.bui@gmail.com>

The 'wakeup-source' property is declared as a phandle-array in both YAML
bindings and Device Tree source files. However, the driver currently
uses of_property_read_bool() to check for its existence.

According to the function's documentation, usage on non-boolean property
types is deprecated. Switch to of_property_present() to comply with the
recommended API for checking the presence of a property.

Fixes: 04d5826b074e ("can: m_can: Map WoL to device_set_wakeup_enable")
Reviewed-by: Kendall Willis <k-willis@ti.com>
Acked-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708030512.8570-1-phucduc.bui@gmail.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/m_can/m_can.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index eb856547ae7d..16f80607e150 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2464,7 +2464,7 @@ struct m_can_classdev *m_can_class_allocate_dev(struct device *dev,
 		return ERR_PTR(ret);
 	}
 
-	if (dev->of_node && of_property_read_bool(dev->of_node, "wakeup-source"))
+	if (dev->of_node && of_property_present(dev->of_node, "wakeup-source"))
 		device_set_wakeup_capable(dev, true);
 
 	/* Get TX FIFO size
-- 
2.53.0


  parent reply	other threads:[~2026-08-17 23:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 23:24 [PATCH net-next 0/11] pull-request: can-next 2026-08-18 Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 01/11] can: tcan4x5x: put tcan into sleep when removing driver Marc Kleine-Budde
2026-08-18 18:37   ` patchwork-bot+netdevbpf
2026-08-18 18:41   ` patchwork-bot+netdevbpf
2026-08-17 23:24 ` [PATCH net-next 02/11] dt-bindings: can: rockchip: add rk3588 CAN-FD compatible Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 03/11] can: rockchip: add RK3588 CAN support Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 04/11] docs: ctucanfd: fix swapped colors in legend for TX buffer FSM of CTU CAN FD Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 05/11] can: vxcan: support per-netns device unregistration Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 06/11] MAINTAINERS: Replace maintainer for Xilinx CAN driver Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 07/11] dt-bindings: net: can: Convert TI HECC to DT schema Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 08/11] dt-bindings: can: xilinx_can: Document phys property Marc Kleine-Budde
2026-08-17 23:24 ` Marc Kleine-Budde [this message]
2026-08-17 23:24 ` [PATCH net-next 10/11] drivers: gs_usb: gs_usb_probe(): fix typo in error message Marc Kleine-Budde
2026-08-17 23:24 ` [PATCH net-next 11/11] can: m_can: pci: Remove driver_data Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260817233420.2068204-10-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=k-willis@ti.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=msp@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=phucduc.bui@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox