diff --git a/include/zephyr/sys/printk-hooks.h b/include/zephyr/sys/printk-hooks.h index a4c347e0ab0..ef59469ed7b 100644 --- a/include/zephyr/sys/printk-hooks.h +++ b/include/zephyr/sys/printk-hooks.h @@ -33,6 +33,6 @@ void __printk_hook_install(printk_hook_fn_t fn); * * @return a function pointer or NULL if no hook is set */ -void *__printk_get_hook(void); +printk_hook_fn_t __printk_get_hook(void); #endif /* ZEPHYR_INCLUDE_SYS_PRINTK_HOOKS_H_ */ diff --git a/lib/os/printk.c b/lib/os/printk.c index aa90efce3e5..c7c276503e2 100644 --- a/lib/os/printk.c +++ b/lib/os/printk.c @@ -60,7 +60,7 @@ void __printk_hook_install(printk_hook_fn_t fn) _char_out = fn; } -void *__printk_get_hook(void) +printk_hook_fn_t __printk_get_hook(void) { return _char_out; }