Commit 8c1bef53 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

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: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
parent c2c6bee0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)