mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-29 09:25:18 -05:00
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:
@@ -94,8 +94,6 @@ static const struct behavior_parameter_metadata metadata = {
|
||||
|
||||
#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
|
||||
|
||||
static int behavior_backlight_init(const struct device *dev) { return 0; }
|
||||
|
||||
static int
|
||||
on_keymap_binding_convert_central_state_dependent_params(struct zmk_behavior_binding *binding,
|
||||
struct zmk_behavior_binding_event event) {
|
||||
@@ -170,7 +168,7 @@ static const struct behavior_driver_api behavior_backlight_driver_api = {
|
||||
#endif
|
||||
};
|
||||
|
||||
BEHAVIOR_DT_INST_DEFINE(0, behavior_backlight_init, NULL, NULL, NULL, POST_KERNEL,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_backlight_driver_api);
|
||||
BEHAVIOR_DT_INST_DEFINE(0, NULL, NULL, NULL, NULL, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||
&behavior_backlight_driver_api);
|
||||
|
||||
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */
|
||||
|
||||
Reference in New Issue
Block a user