lx_emul: initialize auxiliary bus

This commit adds a weak dummy implementation to a compilation unit
that is referenced by all DDE Linux based driver components to
prevent adding a dummy to every driver.
This commit is contained in:
Josef Söntgen 2024-05-30 18:39:34 +02:00 committed by Norman Feske
parent 9eeeb4e36c
commit 7c19e2bc38
2 changed files with 13 additions and 0 deletions

View File

@ -44,3 +44,13 @@ const unsigned long cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)] = {
const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
EXPORT_SYMBOL(cpu_all_bits);
/*
* Provide this init function as a weak symbol so that
* drivers including 'drivers/base/auxiliary.c' in their
* source list can override it but all other drivers are
* indifferent to its existence.
*/
void auxiliary_bus_init(void) __attribute__((weak));
void auxiliary_bus_init(void) { }

View File

@ -37,6 +37,7 @@ extern int devices_init(void);
extern int buses_init(void);
extern int classes_init(void);
extern int platform_bus_init(void);
extern int auxiliary_bus_init(void);
/* definition from kernel/main.c implemented architecture specific */
extern void time_init(void);
@ -64,6 +65,8 @@ static int kernel_init(void * args)
of_core_init();
platform_bus_init();
auxiliary_bus_init();
lx_emul_initcalls();
system_state = SYSTEM_RUNNING;