dts: Replace DT_LABEL(node) with DT_PROP(node, label)

Toward deprecated DT_LABEL() macro, replace the handful of cases
that use DT_LABEL(node) with DT_PROP(node, label).

Signed-off-by: Kumar Gala <galak@kernel.org>
This commit is contained in:
Kumar Gala 2022-08-18 20:59:01 -05:00 committed by Kumar Gala
commit de894f8aab
4 changed files with 6 additions and 6 deletions

View file

@ -235,7 +235,7 @@ const uint8_t color_mapping_##led_node_id[] = \
#define LED_INFO(led_node_id) \
{ \
.label = DT_LABEL(led_node_id), \
.label = DT_PROP(led_node_id, label), \
.index = DT_PROP(led_node_id, index), \
.num_colors = \
DT_PROP_LEN(led_node_id, color_mapping), \

View file

@ -258,7 +258,7 @@ uint8_t flash_area_erased_val(const struct flash_area *fa);
DT_HAS_FIXED_PARTITION_LABEL(label)
#define FLASH_AREA_LABEL_STR(lbl) \
DT_LABEL(DT_NODE_BY_FIXED_PARTITION_LABEL(lbl))
DT_PROP(DT_NODE_BY_FIXED_PARTITION_LABEL(lbl), label)
#define FLASH_AREA_ID(label) \
DT_FIXED_PARTITION_ID(DT_NODE_BY_FIXED_PARTITION_LABEL(label))

View file

@ -63,13 +63,13 @@ static bool init_buttons(void)
} btn_spec[] = {
{
GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios),
DT_LABEL(DT_ALIAS(sw0)),
DT_PROP(DT_ALIAS(sw0), label),
"trigger a transfer",
sw0_handler
},
{
GPIO_DT_SPEC_GET(DT_ALIAS(sw1), gpios),
DT_LABEL(DT_ALIAS(sw1)),
DT_PROP(DT_ALIAS(sw1), label),
"switch the type of peripheral",
sw1_handler
},

View file

@ -22,7 +22,7 @@ const uint8_t test_color_mapping_##led_node_id[] = \
#define LED_INFO_COLOR(led_node_id) \
{ \
.label = DT_LABEL(led_node_id), \
.label = DT_PROP(led_node_id, label), \
.index = DT_PROP_OR(led_node_id, index, 0), \
.num_colors = \
DT_PROP_LEN(led_node_id, color_mapping), \
@ -31,7 +31,7 @@ const uint8_t test_color_mapping_##led_node_id[] = \
#define LED_INFO_NO_COLOR(led_node_id) \
{ \
.label = DT_LABEL(led_node_id), \
.label = DT_PROP(led_node_id, label), \
.index = DT_PROP_OR(led_node_id, index, 0), \
.num_colors = 0, \
.color_mapping = NULL, \