mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
can: m_can: Use of_property_present() for wakeup-source
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: 04d5826b07 ("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>
This commit is contained in:
parent
a7345ad73a
commit
966506838a
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user