device: support generating defines from devicetree nodes with no label
The existing code only worked for nodes that had a label property, which is every device except ESP32 pinmux. However, a label property should not be necessary for defining a device from devicetree. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
c2c6bee036
commit
8c1bef535b
1 changed files with 2 additions and 1 deletions
|
@ -168,7 +168,8 @@ extern "C" {
|
|||
*/
|
||||
#define DEVICE_DT_DEFINE(node_id, init_fn, pm_control_fn, \
|
||||
data_ptr, cfg_ptr, level, prio, api_ptr) \
|
||||
Z_DEVICE_DEFINE(node_id, node_id, DT_LABEL(node_id), init_fn, \
|
||||
Z_DEVICE_DEFINE(node_id, node_id, \
|
||||
DT_PROP_OR(node_id, label, NULL), init_fn, \
|
||||
pm_control_fn, \
|
||||
data_ptr, cfg_ptr, level, prio, api_ptr)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue