44acfc22c7
When building the Surface Aggregator Module (SAM) core, registry, and
other SAM client drivers as builtin modules (=y), proper initialization
order is not guaranteed. Due to this, client driver registration
(triggered by device registration in the registry) races against bus
initialization in the core.
If any attempt is made at registering the device driver before the bus
has been initialized (i.e. if bus initialization fails this race) driver
registration will fail with a message similar to:
Driver surface_battery was unable to register with bus_type surface_aggregator because the bus was not initialized
Switch from module_init() to subsys_initcall() to resolve this issue.
Note that the serdev subsystem uses postcore_initcall() so we are still
able to safely register the serdev device driver for the core.
Fixes:
|
||
---|---|---|
.. | ||
aggregator | ||
Kconfig | ||
Makefile | ||
surface3-wmi.c | ||
surface3_power.c | ||
surface_acpi_notify.c | ||
surface_aggregator_cdev.c | ||
surface_aggregator_registry.c | ||
surface_dtx.c | ||
surface_gpe.c | ||
surface_hotplug.c | ||
surface_platform_profile.c | ||
surfacepro3_button.c |