diff options
| author | Nathan Lee <me@nwlee.tech> | 2026-08-03 20:40:02 -0500 |
|---|---|---|
| committer | Nathan Lee <me@nwlee.tech> | 2026-08-03 20:40:02 -0500 |
| commit | 30c8810932c704f81b2d25b43e7715fa4238342f (patch) | |
| tree | 1149e9ba7d168af446e4417fb689619361d07a37 /console | |
| parent | 6982057b61e939fa14418356969753a3c33ebf94 (diff) | |
use a shared function for callback registration, for easier GOT linking
Diffstat (limited to 'console')
| -rw-r--r-- | console/module_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/console/module_main.c b/console/module_main.c index 8aeac9f..643afc1 100644 --- a/console/module_main.c +++ b/console/module_main.c @@ -5,8 +5,6 @@ #define __KERNEL_MODULE__ #endif -extern console_callback_t callback; - struct console_device_meta { void *register_controller; void *data_start; @@ -29,7 +27,7 @@ __attribute__((visibility("hidden"))) void console_put_char(char c) { int __attribute__((section(".module_init"))) module_init(struct mmio_device_meta *meta) { - callback = console_put_char; + register_console_callback(console_put_char); dev_meta.register_controller = meta->start; dev_meta.data_start = (void *)((uint8_t *)meta->start + 1); |
