[PATCH 2/3] usb: phy: phy-ab8500-usb: convert to subsys_platform_driver()
From: Brian Masney
Date: Fri Nov 06 2026 - 19:36:17 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/usb/phy/phy-ab8500-usb.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index e2e06e57dced..2c569c3244a0 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -988,17 +988,7 @@ static struct platform_driver ab8500_usb_driver = {
},
};
-static int __init ab8500_usb_init(void)
-{
- return platform_driver_register(&ab8500_usb_driver);
-}
-subsys_initcall(ab8500_usb_init);
-
-static void __exit ab8500_usb_exit(void)
-{
- platform_driver_unregister(&ab8500_usb_driver);
-}
-module_exit(ab8500_usb_exit);
+subsys_platform_driver(ab8500_usb_driver);
MODULE_AUTHOR("ST-Ericsson AB");
MODULE_DESCRIPTION("AB8500 family usb transceiver driver");
--
2.56.0