]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
firmware: google: Init coreboot bus with subsys_initcall()
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 17 Feb 2026 15:56:16 +0000 (16:56 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 20 Feb 2026 13:38:20 +0000 (14:38 +0100)
Using module_init()/device_initcall() is too late to initialize
the coreboot bus, as there might already be drivers that depend
on it.

So far this hasn't been a problem, as coreboot controls all device
creation. Initializing the coreboot bus earlier in subsys_initcall()
will allow for external coreboot drivers to register themselves
with device_initcall(). Prepares coreboot to support additional
coreboot drivers from other subsystems.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Tzung-Bi Shih <tzungbi@kernel.org>
Acked-by: Julius Werner <jwerner@chromium.org>
Link: https://patch.msgid.link/20260217155836.96267-7-tzimmermann@suse.de
drivers/firmware/google/coreboot_table.c

index 882db32e51be975a5304cf364feb281578f78627..26d93781e64a1648dea482691a79c2c2885e4d37 100644 (file)
@@ -251,7 +251,7 @@ static void __exit coreboot_table_driver_exit(void)
        bus_unregister(&coreboot_bus_type);
 }
 
-module_init(coreboot_table_driver_init);
+subsys_initcall(coreboot_table_driver_init);
 module_exit(coreboot_table_driver_exit);
 
 MODULE_AUTHOR("Google, Inc.");