diff options
Diffstat (limited to 'include/hooks.h')
-rw-r--r-- | include/hooks.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hooks.h b/include/hooks.h index fb3e6c236b..944d44bd06 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -192,6 +192,7 @@ void hook_notify(enum hook_type type); */ int hook_call_deferred(void (*routine)(void), int us); +#ifdef CONFIG_COMMON_RUNTIME /** * Register a hook routine. * @@ -248,4 +249,9 @@ struct deferred_data { __attribute__((section(".rodata.deferred"))) \ = {routine} +#else /* CONFIG_COMMON_RUNTIME */ +#define DECLARE_HOOK(t, func, p) void unused_hook_##func(void) { func(); } +#define DECLARE_DEFERRED(func) void unused_deferred_##func(void) { func(); } +#endif /* CONFIG_COMMON_RUNTIME */ + #endif /* __CROS_EC_HOOKS_H */ |