Skip to content
/ linux Public

Commit bfcee87

Browse files
Thadeu Lima de Souza CascardoSasha Levin
authored andcommitted
fpga: dfl: use subsys_initcall to allow built-in drivers to be added
[ Upstream commit 267f531 ] The dfl code adds a bus. If it is built-in and there is a built-in driver as well, the dfl module_init may be called after the driver module_init, leading to a failure to register the driver as the bus has not been added yet. Use subsys_initcall, which guarantees it will be called before the drivers init code. Without the fix, we see failures like this: [ 0.479475] Driver 'intel-m10-bmc' was unable to register with bus_type 'dfl' because the bus was not initialized. Cc: stable@vger.kernel.org Fixes: 9ba3a0a ("fpga: dfl: create a dfl bus type to support DFL devices") Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Link: https://lore.kernel.org/r/20251215-dfl_subsys-v1-1-21807bad6b10@igalia.com Reviewed-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a0eb5f8 commit bfcee87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/fpga/dfl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2018,7 +2018,7 @@ static void __exit dfl_fpga_exit(void)
20182018
bus_unregister(&dfl_bus_type);
20192019
}
20202020

2021-
module_init(dfl_fpga_init);
2021+
subsys_initcall(dfl_fpga_init);
20222022
module_exit(dfl_fpga_exit);
20232023

20242024
MODULE_DESCRIPTION("FPGA Device Feature List (DFL) Support");

0 commit comments

Comments
 (0)