devicetree: Use IS_EQ() for DT_SAME_NODE()

`DT_SAME_NODE()` is judged by `==` and cannot be used as
a condition for `COND_CODE_1()`.
Using `IS_EQ()` to make it possible for compile-time
calculation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2025-06-08 08:11:20 +09:00 committed by Benjamin Cabé
commit ba48d83bec

View file

@ -690,7 +690,7 @@
* refer to the same node, and evaluates to 0 otherwise
*/
#define DT_SAME_NODE(node_id1, node_id2) \
(DT_DEP_ORD(node_id1) == (DT_DEP_ORD(node_id2)))
IS_EQ(DT_DEP_ORD(node_id1), DT_DEP_ORD(node_id2))
/**
* @brief Get a devicetree node's node labels as an array of strings