Skip to content

Commit ca5f24e

Browse files
pillo79carlescufi
authored andcommitted
device.h: fix misleading comment
The comment for Z_DEVICE_DT_DEV_ID() is misleading: device_get_binding() compares its inputs with values generated by the DEVICE_DT_NAME() macro, which expands to the node's DT label or to the node's full name. This patch updates the comment to reflect the actual behavior of Z_DEVICE_DT_DEV_ID(). Signed-off-by: Luca Burelli <[email protected]>
1 parent 811330b commit ca5f24e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/zephyr/device.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ typedef int16_t device_handle_t;
9191
*/
9292
#define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
9393

94-
/* Node paths can exceed the maximum size supported by
95-
* device_get_binding() in user mode; this macro synthesizes a unique
96-
* dev_id from a devicetree node while staying within this maximum
97-
* size.
94+
/* This macro synthesizes a unique dev_id from a devicetree node by using
95+
* the node's dependency ordinal.
9896
*
9997
* The ordinal used in this name can be mapped to the path by
10098
* examining zephyr/include/generated/zephyr/devicetree_generated.h.

0 commit comments

Comments
 (0)