[PATCH] phy: ti: Convert to subsys_platform_driver()

From: Peng Fan (OSS)

Date: Wed Nov 04 2026 - 06:37:54 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/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