refactor(behaviors): Remove unneeded init funcs. (#2843)
Initialization functions are optional for Zephyr drivers, so remove all our superfluous empty init functions.
This commit is contained in:
parent
7186528f77
commit
21f54e7238
21 changed files with 43 additions and 103 deletions
|
|
@ -72,8 +72,6 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding,
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int behavior_out_init(const struct device *dev) { return 0; }
|
||||
|
||||
static const struct behavior_driver_api behavior_outputs_driver_api = {
|
||||
.binding_pressed = on_keymap_binding_pressed,
|
||||
#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
|
||||
|
|
@ -81,7 +79,7 @@ static const struct behavior_driver_api behavior_outputs_driver_api = {
|
|||
#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
|
||||
};
|
||||
|
||||
BEHAVIOR_DT_INST_DEFINE(0, behavior_out_init, NULL, NULL, NULL, POST_KERNEL,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_outputs_driver_api);
|
||||
BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||
&behavior_outputs_driver_api);
|
||||
|
||||
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue