From 8157b6ed22735caa160a0508b03d58e00fe890f0 Mon Sep 17 00:00:00 2001 From: Void Your Warranty Date: Mon, 7 Oct 2024 12:09:00 +0200 Subject: [PATCH] Rebased to the current main. --- app/src/behaviors/behavior_antecedent_morph.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/behaviors/behavior_antecedent_morph.c b/app/src/behaviors/behavior_antecedent_morph.c index 74daf8f4e3c5..9a5555f12172 100644 --- a/app/src/behaviors/behavior_antecedent_morph.c +++ b/app/src/behaviors/behavior_antecedent_morph.c @@ -89,7 +89,7 @@ static int antecedent_morph_keycode_state_changed_listener(const zmk_event_t *eh static int on_antecedent_morph_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_antecedent_morph_config *cfg = dev->config; struct behavior_antecedent_morph_data *data = dev->data; int morph = -1; @@ -146,7 +146,7 @@ static int on_antecedent_morph_binding_pressed(struct zmk_behavior_binding *bind static int on_antecedent_morph_binding_released(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *dev = device_get_binding(binding->behavior_dev); + const struct device *dev = zmk_behavior_get_binding(binding->behavior_dev); const struct behavior_antecedent_morph_config *cfg = dev->config; struct behavior_antecedent_morph_data *data = dev->data; @@ -184,7 +184,7 @@ static int behavior_antecedent_morph_init(const struct device *dev) { #define ZMK_KEYMAP_EXTRACT_DEFAULT(idx, drv_inst) \ { \ - .behavior_dev = DT_PROP(DT_PHANDLE_BY_IDX(drv_inst, defaults, idx), label), \ + .behavior_dev = DEVICE_DT_NAME(DT_PHANDLE_BY_IDX(drv_inst, defaults, idx)), \ .param1 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, defaults, idx, param1), (0), \ (DT_PHA_BY_IDX(drv_inst, defaults, idx, param1))), \ .param2 = COND_CODE_0(DT_PHA_HAS_CELL_AT_IDX(drv_inst, defaults, idx, param2), (0), \ @@ -218,7 +218,7 @@ static int behavior_antecedent_morph_init(const struct device *dev) { }; \ static struct behavior_antecedent_morph_data behavior_antecedent_morph_data_##n = { \ }; \ - DEVICE_DT_INST_DEFINE(n,behavior_antecedent_morph_init,NULL,&behavior_antecedent_morph_data_##n, \ + BEHAVIOR_DT_INST_DEFINE(n,behavior_antecedent_morph_init,NULL,&behavior_antecedent_morph_data_##n, \ &behavior_antecedent_morph_config_##n, \ POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ &behavior_antecedent_morph_driver_api);