[PATCH 1/2] phy: ti: omap-control: convert to subsys_platform_driver()

Brian Masney bmasney at redhat.com
Fri Nov 6 16:25:20 PST 2026


Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().

Signed-off-by: Brian Masney <bmasney at redhat.com>
---
 drivers/phy/ti/phy-omap-control.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/phy/ti/phy-omap-control.c b/drivers/phy/ti/phy-omap-control.c
index 4968434312f8..3747401600a6 100644
--- a/drivers/phy/ti/phy-omap-control.c
+++ b/drivers/phy/ti/phy-omap-control.c
@@ -322,17 +322,7 @@ static struct platform_driver omap_control_phy_driver = {
 	},
 };
 
-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");

-- 
2.56.0




More information about the linux-phy mailing list