[PATCH 2/2] phy: ti: phy-twl4030-usb: convert to subsys_platform_driver()
From: Brian Masney
Date: Fri Nov 06 2026 - 19:25:58 EST
Reduce boilerplate code in this driver and convert it over to use
the macro subsys_platform_driver().
Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
---
drivers/phy/ti/phy-twl4030-usb.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/phy/ti/phy-twl4030-usb.c b/drivers/phy/ti/phy-twl4030-usb.c
index a26aec3ab29e..08aaf0f8712b 100644
--- a/drivers/phy/ti/phy-twl4030-usb.c
+++ b/drivers/phy/ti/phy-twl4030-usb.c
@@ -841,17 +841,7 @@ static struct platform_driver twl4030_usb_driver = {
},
};
-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.56.0