* [PATCH] mailbox: Convert to subsys_platform_driver()
@ 2026-11-04 11:33 Peng Fan (OSS)
2026-11-04 12:59 ` AngeloGioacchino Del Regno
2026-11-04 16:08 ` Prasanna Kumar T S M
0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:33 UTC (permalink / raw)
To: Jassi Brar, Matthias Brugger, AngeloGioacchino Del Regno, Michal Simek
Cc: linux-kernel, linux-arm-kernel, linux-mediatek
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/mailbox/mailbox-xgene-slimpro.c | 13 +------------
drivers/mailbox/mtk-cmdq-mailbox.c | 13 +------------
drivers/mailbox/zynqmp-ipi-mailbox.c | 13 +------------
3 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c
index 1f87a84e5995..f489bcabceff 100644
--- a/drivers/mailbox/mailbox-xgene-slimpro.c
+++ b/drivers/mailbox/mailbox-xgene-slimpro.c
@@ -243,18 +243,7 @@ static struct platform_driver slimpro_mbox_driver = {
},
};
-static int __init slimpro_mbox_init(void)
-{
- return platform_driver_register(&slimpro_mbox_driver);
-}
-
-static void __exit slimpro_mbox_exit(void)
-{
- platform_driver_unregister(&slimpro_mbox_driver);
-}
-
-subsys_initcall(slimpro_mbox_init);
-module_exit(slimpro_mbox_exit);
+subsys_platform_driver(slimpro_mbox_driver);
MODULE_DESCRIPTION("APM X-Gene SLIMpro Mailbox Driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 96462ca84471..262832753fa5 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -875,18 +875,7 @@ static struct platform_driver cmdq_drv = {
}
};
-static int __init cmdq_drv_init(void)
-{
- return platform_driver_register(&cmdq_drv);
-}
-
-static void __exit cmdq_drv_exit(void)
-{
- platform_driver_unregister(&cmdq_drv);
-}
-
-subsys_initcall(cmdq_drv_init);
-module_exit(cmdq_drv_exit);
+subsys_platform_driver(cmdq_drv);
MODULE_DESCRIPTION("Mediatek Command Queue(CMDQ) Mailbox driver");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index 42d2583e44ca..da7d33435cdb 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -1022,18 +1022,7 @@ static struct platform_driver zynqmp_ipi_driver = {
.of_match_table = of_match_ptr(zynqmp_ipi_of_match),
},
};
-
-static int __init zynqmp_ipi_init(void)
-{
- return platform_driver_register(&zynqmp_ipi_driver);
-}
-subsys_initcall(zynqmp_ipi_init);
-
-static void __exit zynqmp_ipi_exit(void)
-{
- platform_driver_unregister(&zynqmp_ipi_driver);
-}
-module_exit(zynqmp_ipi_exit);
+subsys_platform_driver(zynqmp_ipi_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Xilinx ZynqMP IPI Mailbox driver");
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mailbox: Convert to subsys_platform_driver()
2026-11-04 11:33 [PATCH] mailbox: Convert to subsys_platform_driver() Peng Fan (OSS)
@ 2026-11-04 12:59 ` AngeloGioacchino Del Regno
2026-11-04 16:08 ` Prasanna Kumar T S M
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-11-04 12:59 UTC (permalink / raw)
To: Peng Fan (OSS), Jassi Brar, Matthias Brugger, Michal Simek
Cc: linux-kernel, linux-arm-kernel, linux-mediatek
On 11/4/26 12:33, 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>
For MediaTek:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mailbox: Convert to subsys_platform_driver()
2026-11-04 11:33 [PATCH] mailbox: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 12:59 ` AngeloGioacchino Del Regno
@ 2026-11-04 16:08 ` Prasanna Kumar T S M
1 sibling, 0 replies; 3+ messages in thread
From: Prasanna Kumar T S M @ 2026-11-04 16:08 UTC (permalink / raw)
To: Peng Fan (OSS),
Jassi Brar, Matthias Brugger, AngeloGioacchino Del Regno,
Michal Simek
Cc: linux-kernel, linux-arm-kernel, linux-mediatek
Hi Peng,
On 04-11-2026 17:03, 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/mailbox/mailbox-xgene-slimpro.c | 13 +------------
> drivers/mailbox/mtk-cmdq-mailbox.c | 13 +------------
> drivers/mailbox/zynqmp-ipi-mailbox.c | 13 +------------
> 3 files changed, 3 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c
> index 1f87a84e5995..f489bcabceff 100644
> --- a/drivers/mailbox/mailbox-xgene-slimpro.c
> +++ b/drivers/mailbox/mailbox-xgene-slimpro.c
> @@ -243,18 +243,7 @@ static struct platform_driver slimpro_mbox_driver = {
> },
> };
>
> -static int __init slimpro_mbox_init(void)
> -{
> - return platform_driver_register(&slimpro_mbox_driver);
> -}
> -
> -static void __exit slimpro_mbox_exit(void)
> -{
> - platform_driver_unregister(&slimpro_mbox_driver);
> -}
> -
> -subsys_initcall(slimpro_mbox_init);
> -module_exit(slimpro_mbox_exit);
> +subsys_platform_driver(slimpro_mbox_driver);
>
> MODULE_DESCRIPTION("APM X-Gene SLIMpro Mailbox Driver");
> MODULE_LICENSE("GPL");
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 96462ca84471..262832753fa5 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -875,18 +875,7 @@ static struct platform_driver cmdq_drv = {
> }
> };
>
> -static int __init cmdq_drv_init(void)
> -{
> - return platform_driver_register(&cmdq_drv);
> -}
> -
> -static void __exit cmdq_drv_exit(void)
> -{
> - platform_driver_unregister(&cmdq_drv);
> -}
> -
> -subsys_initcall(cmdq_drv_init);
> -module_exit(cmdq_drv_exit);
> +subsys_platform_driver(cmdq_drv);
>
> MODULE_DESCRIPTION("Mediatek Command Queue(CMDQ) Mailbox driver");
> MODULE_LICENSE("GPL v2");
> diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
> index 42d2583e44ca..da7d33435cdb 100644
> --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
> +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
> @@ -1022,18 +1022,7 @@ static struct platform_driver zynqmp_ipi_driver = {
> .of_match_table = of_match_ptr(zynqmp_ipi_of_match),
> },
> };
> -
> -static int __init zynqmp_ipi_init(void)
> -{
> - return platform_driver_register(&zynqmp_ipi_driver);
> -}
> -subsys_initcall(zynqmp_ipi_init);
> -
> -static void __exit zynqmp_ipi_exit(void)
> -{
> - platform_driver_unregister(&zynqmp_ipi_driver);
> -}
> -module_exit(zynqmp_ipi_exit);
> +subsys_platform_driver(zynqmp_ipi_driver);
>
> MODULE_LICENSE("GPL v2");
> MODULE_DESCRIPTION("Xilinx ZynqMP IPI Mailbox driver");
Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
Regards,
Prasanna Kumar
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-04 16:08 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:33 [PATCH] mailbox: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 12:59 ` AngeloGioacchino Del Regno
2026-11-04 16:08 ` Prasanna Kumar T S M
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®