mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] usb: phy: convert to subsys_platform_driver()
@ 2026-11-07  0:35 Brian Masney
  2026-11-07  0:35 ` [PATCH 1/3] usb: phy: generic: " Brian Masney
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Brian Masney @ 2026-11-07  0:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Brian Masney

Reduce boilerplate code in these drivers and convert them over to use
the macro subsys_platform_driver().

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Brian Masney (3):
      usb: phy: generic: convert to subsys_platform_driver()
      usb: phy: phy-ab8500-usb: convert to subsys_platform_driver()
      usb: phy: twl6030: convert to subsys_platform_driver()

 drivers/usb/phy/phy-ab8500-usb.c  | 12 +-----------
 drivers/usb/phy/phy-generic.c     | 12 +-----------
 drivers/usb/phy/phy-twl6030-usb.c | 12 +-----------
 3 files changed, 3 insertions(+), 33 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-usb-subsys-8f41bd9464a8

Best regards,
--  
Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] usb: phy: generic: convert to subsys_platform_driver()
  2026-11-07  0:35 [PATCH 0/3] usb: phy: convert to subsys_platform_driver() Brian Masney
@ 2026-11-07  0:35 ` Brian Masney
  2026-11-07  0:35 ` [PATCH 2/3] usb: phy: phy-ab8500-usb: " Brian Masney
  2026-11-07  0:35 ` [PATCH 3/3] usb: phy: twl6030: " Brian Masney
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Masney @ 2026-11-07  0:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Brian Masney

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

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

diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index a41671eda2a1..68deb7e52b43 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -329,17 +329,7 @@ static struct platform_driver usb_phy_generic_driver = {
 	},
 };
 
-static int __init usb_phy_generic_init(void)
-{
-	return platform_driver_register(&usb_phy_generic_driver);
-}
-subsys_initcall(usb_phy_generic_init);
-
-static void __exit usb_phy_generic_exit(void)
-{
-	platform_driver_unregister(&usb_phy_generic_driver);
-}
-module_exit(usb_phy_generic_exit);
+subsys_platform_driver(usb_phy_generic_driver);
 
 MODULE_ALIAS("platform:usb_phy_generic");
 MODULE_AUTHOR("Texas Instruments Inc");

-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] usb: phy: phy-ab8500-usb: convert to subsys_platform_driver()
  2026-11-07  0:35 [PATCH 0/3] usb: phy: convert to subsys_platform_driver() Brian Masney
  2026-11-07  0:35 ` [PATCH 1/3] usb: phy: generic: " Brian Masney
@ 2026-11-07  0:35 ` Brian Masney
  2026-11-07  0:35 ` [PATCH 3/3] usb: phy: twl6030: " Brian Masney
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Masney @ 2026-11-07  0:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Brian Masney

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

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] usb: phy: twl6030: convert to subsys_platform_driver()
  2026-11-07  0:35 [PATCH 0/3] usb: phy: convert to subsys_platform_driver() Brian Masney
  2026-11-07  0:35 ` [PATCH 1/3] usb: phy: generic: " Brian Masney
  2026-11-07  0:35 ` [PATCH 2/3] usb: phy: phy-ab8500-usb: " Brian Masney
@ 2026-11-07  0:35 ` Brian Masney
  2 siblings, 0 replies; 4+ messages in thread
From: Brian Masney @ 2026-11-07  0:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Brian Masney

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

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

diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c
index 8c09db750bfd..5b71aa95b779 100644
--- a/drivers/usb/phy/phy-twl6030-usb.c
+++ b/drivers/usb/phy/phy-twl6030-usb.c
@@ -439,17 +439,7 @@ static struct platform_driver twl6030_usb_driver = {
 	},
 };
 
-static int __init twl6030_usb_init(void)
-{
-	return platform_driver_register(&twl6030_usb_driver);
-}
-subsys_initcall(twl6030_usb_init);
-
-static void __exit twl6030_usb_exit(void)
-{
-	platform_driver_unregister(&twl6030_usb_driver);
-}
-module_exit(twl6030_usb_exit);
+subsys_platform_driver(twl6030_usb_driver);
 
 MODULE_ALIAS("platform:twl6030_usb");
 MODULE_AUTHOR("Hema HK <hemahk@ti.com>");

-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-07  0:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07  0:35 [PATCH 0/3] usb: phy: convert to subsys_platform_driver() Brian Masney
2026-11-07  0:35 ` [PATCH 1/3] usb: phy: generic: " Brian Masney
2026-11-07  0:35 ` [PATCH 2/3] usb: phy: phy-ab8500-usb: " Brian Masney
2026-11-07  0:35 ` [PATCH 3/3] usb: phy: twl6030: " Brian Masney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®