[PATCH] PCI: altera-msi: Convert to subsys_platform_driver()

From: Peng Fan (OSS)

Date: Wed Nov 04 2026 - 06:38:17 EST


From: Peng Fan <peng.fan@xxxxxxx>

Replace the open-coded subsys_initcall()/module_exit() platform driver
registration with subsys_platform_driver().

No functional change.

Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
drivers/pci/controller/pcie-altera-msi.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/controller/pcie-altera-msi.c
index ea2ca2e70f20..8c0696cbd4ae 100644
--- a/drivers/pci/controller/pcie-altera-msi.c
+++ b/drivers/pci/controller/pcie-altera-msi.c
@@ -267,18 +267,7 @@ static struct platform_driver altera_msi_driver = {
.remove = altera_msi_remove,
};

-static int __init altera_msi_init(void)
-{
- return platform_driver_register(&altera_msi_driver);
-}
-
-static void __exit altera_msi_exit(void)
-{
- platform_driver_unregister(&altera_msi_driver);
-}
-
-subsys_initcall(altera_msi_init);
+subsys_platform_driver(altera_msi_driver);
MODULE_DEVICE_TABLE(of, altera_msi_of_match);
-module_exit(altera_msi_exit);
MODULE_DESCRIPTION("Altera PCIe MSI support driver");
MODULE_LICENSE("GPL v2");
--
2.51.0