[PATCH 1/2] fwctl: use subsys_initcall for built-in configuration

Zhi Wang posted 2 patches 1 month ago
[PATCH 1/2] fwctl: use subsys_initcall for built-in configuration
Posted by Zhi Wang 1 month ago
Rust does not yet support loadable kernel modules, so
RUST_FWCTL_ABSTRACTIONS is a Kconfig bool, which forces fwctl to be
built-in. With module_init, fwctl initializes too late and PCI drivers
probe before the fwctl class is registered.

Switch to subsys_initcall.

Signed-off-by: Zhi Wang <zhiw@nvidia.com>
---
 drivers/fwctl/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fwctl/main.c b/drivers/fwctl/main.c
index bc6378506296..098c3824ad75 100644
--- a/drivers/fwctl/main.c
+++ b/drivers/fwctl/main.c
@@ -415,7 +415,7 @@ static void __exit fwctl_exit(void)
 	unregister_chrdev_region(fwctl_dev, FWCTL_MAX_DEVICES);
 }
 
-module_init(fwctl_init);
+subsys_initcall(fwctl_init);
 module_exit(fwctl_exit);
 MODULE_DESCRIPTION("fwctl device firmware access framework");
 MODULE_LICENSE("GPL");
-- 
2.51.0