* [PATCH] PCI: altera-msi: Convert to subsys_platform_driver()
@ 2026-11-04 11:32 Peng Fan (OSS)
2026-11-05 15:49 ` Manivannan Sadhasivam
2026-11-05 17:38 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:32 UTC (permalink / raw)
To: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas
Cc: linux-pci, linux-kernel
From: Peng Fan <peng.fan@nxp.com>
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@nxp.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: altera-msi: Convert to subsys_platform_driver()
2026-11-04 11:32 [PATCH] PCI: altera-msi: Convert to subsys_platform_driver() Peng Fan (OSS)
@ 2026-11-05 15:49 ` Manivannan Sadhasivam
2026-11-05 17:38 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2026-11-05 15:49 UTC (permalink / raw)
To: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Peng Fan (OSS)
Cc: linux-pci, linux-kernel
On Wed, 04 Nov 2026 19:32:35 +0800, Peng Fan (OSS) wrote:
> PCI: altera-msi: Convert to subsys_platform_driver()
Applied, thanks!
[1/1] PCI: altera-msi: Convert to subsys_platform_driver()
commit: e5b8af7c98f184590b82d505f8ade025ba7cafae
Best regards,
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: altera-msi: Convert to subsys_platform_driver()
2026-11-04 11:32 [PATCH] PCI: altera-msi: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-05 15:49 ` Manivannan Sadhasivam
@ 2026-11-05 17:38 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2026-11-05 17:38 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, linux-pci,
linux-kernel, Toan Le, Mahesh Vaidya, DM, Sharath Kumar
[+cc Altera, X-Gene folks]
On Wed, Nov 04, 2026 at 07:32:35PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> 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@nxp.com>
> ---
> 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");
Looks like a nice improvement.
There are only three drivers that have separate MSI Kconfig options
and separate -msi.c files: altera, iproc, and xgene.
pcie-iproc-msi.c doesn't look like it has its own DT .compatible
string and driver registration stuff, but altera and xgene do. I
wonder if it's possible to integrate them into the main drivers so we
don't need separate Kconfig and separate .c files?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-05 17:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 11:32 [PATCH] PCI: altera-msi: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-05 15:49 ` Manivannan Sadhasivam
2026-11-05 17:38 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®