phy: convert to subsys_platform_driver()
cover phy: convert to subsys_platform_driver()
Reduce boilerplate code in these drivers and convert them over to use the macro subsys_platform_driver().
---
Brian Masney (2):
phy: ti: omap-control: convert to subsys_platform_driver()
phy: ti: phy-twl4030-usb: convert to subsys_platform_driver()
drivers/phy/ti/phy-omap-control.c | 12 +----------- drivers/phy/ti/phy-twl4030-usb.c | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-phy-subsys-1ee69f26649f
Best regards,
Signature · 1 line
Brian Masney <[email protected]>
PATCH 1/2 phy: ti: omap-control: convert to subsys_platform_driver()
Reduce boilerplate code in this driver and convert it over to use the macro subsys_platform_driver().
--- drivers/phy/ti/phy-omap-control.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/phy/ti/phy-omap-control.c +1 -11
@@ -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" );
Signature · 1 line
2.56.0
PATCH 2/2 phy: ti: phy-twl4030-usb: convert to subsys_platform_driver()
In reply to Brian MasneyReduce boilerplate code in this driver and convert it over to use the macro subsys_platform_driver().
--- drivers/phy/ti/phy-twl4030-usb.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/phy/ti/phy-twl4030-usb.c +1 -11
@@ -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" );
Signature · 1 line
2.56.0