* [PATCH] phy: ti: Convert to subsys_platform_driver()
@ 2026-11-04 11:33 Peng Fan (OSS)
2026-11-24 10:59 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:33 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam; +Cc: linux-phy, 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/phy/ti/phy-omap-control.c | 13 +------------
drivers/phy/ti/phy-twl4030-usb.c | 13 +------------
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/phy/ti/phy-omap-control.c b/drivers/phy/ti/phy-omap-control.c
index 4968434312f8..802ffe1ee6b5 100644
--- a/drivers/phy/ti/phy-omap-control.c
+++ b/drivers/phy/ti/phy-omap-control.c
@@ -321,18 +321,7 @@ static struct platform_driver omap_control_phy_driver = {
.of_match_table = omap_control_phy_id_table,
},
};
-
-static int __init omap_control_phy_init(void)
-{
- return platform_driver_register(&omap_control_phy_driver);
-}
-subsys_initcall(omap_control_phy_init);
-
-static void __exit omap_control_phy_exit(void)
-{
- platform_driver_unregister(&omap_control_phy_driver);
-}
-module_exit(omap_control_phy_exit);
+subsys_platform_driver(omap_control_phy_driver);
MODULE_AUTHOR("Texas Instruments Inc.");
MODULE_DESCRIPTION("OMAP Control Module PHY Driver");
diff --git a/drivers/phy/ti/phy-twl4030-usb.c b/drivers/phy/ti/phy-twl4030-usb.c
index a26aec3ab29e..75977bf26f90 100644
--- a/drivers/phy/ti/phy-twl4030-usb.c
+++ b/drivers/phy/ti/phy-twl4030-usb.c
@@ -840,18 +840,7 @@ static struct platform_driver twl4030_usb_driver = {
.of_match_table = of_match_ptr(twl4030_usb_id_table),
},
};
-
-static int __init twl4030_usb_init(void)
-{
- return platform_driver_register(&twl4030_usb_driver);
-}
-subsys_initcall(twl4030_usb_init);
-
-static void __exit twl4030_usb_exit(void)
-{
- platform_driver_unregister(&twl4030_usb_driver);
-}
-module_exit(twl4030_usb_exit);
+subsys_platform_driver(twl4030_usb_driver);
MODULE_ALIAS("platform:twl4030_usb");
MODULE_AUTHOR("Texas Instruments, Inc, Nokia Corporation");
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 10:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 11:33 [PATCH] phy: ti: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-24 10:59 ` Vinod Koul
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®