forked from kofal.net/zmk
refactor(behaviors): Make label property optional
Changed all code (except for layer names) which used the label property to use DEVICE_DT_NAME() instead, which uses the label if set or falls back to the full node name. This matches how Zephyr determines the node names used with device_get_binding() and allows us to start removing the deprecated label property from things.
This commit is contained in:
@@ -81,7 +81,7 @@ static int behavior_mod_morph_init(const struct device *dev) { return 0; }
|
||||
|
||||
#define _TRANSFORM_ENTRY(idx, node) \
|
||||
{ \
|
||||
.behavior_dev = DT_PROP(DT_INST_PHANDLE_BY_IDX(node, bindings, idx), label), \
|
||||
.behavior_dev = DEVICE_DT_NAME(DT_INST_PHANDLE_BY_IDX(node, bindings, idx)), \
|
||||
.param1 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param1), (0), \
|
||||
(DT_INST_PHA_BY_IDX(node, bindings, idx, param1))), \
|
||||
.param2 = COND_CODE_0(DT_INST_PHA_HAS_CELL_AT_IDX(node, bindings, idx, param2), (0), \
|
||||
|
||||
Reference in New Issue
Block a user