* [PATCH] usb: phy: Convert to subsys_platform_driver()
@ 2026-11-04 11:34 Peng Fan (OSS)
2026-11-04 11:40 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:34 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel
From: Peng Fan <peng.fan@nxp.com>
Replace the open-coded subsys_initcall()/module_exit() platform driver
registration with subsys_platform_driver().
No functional change.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/usb/phy/phy-ab8500-usb.c | 13 +------------
drivers/usb/phy/phy-generic.c | 13 +------------
drivers/usb/phy/phy-twl6030-usb.c | 13 +------------
3 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/drivers/usb/phy/phy-ab8500-usb.c b/drivers/usb/phy/phy-ab8500-usb.c
index e2e06e57dced..ad568e7e3d14 100644
--- a/drivers/usb/phy/phy-ab8500-usb.c
+++ b/drivers/usb/phy/phy-ab8500-usb.c
@@ -987,18 +987,7 @@ static struct platform_driver ab8500_usb_driver = {
.name = "abx5x0-usb",
},
};
-
-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");
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index a41671eda2a1..a443ddcddf87 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -328,18 +328,7 @@ static struct platform_driver usb_phy_generic_driver = {
.of_match_table = nop_xceiv_dt_ids,
},
};
-
-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");
diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c
index 8c09db750bfd..a3cdc421ef1d 100644
--- a/drivers/usb/phy/phy-twl6030-usb.c
+++ b/drivers/usb/phy/phy-twl6030-usb.c
@@ -438,18 +438,7 @@ static struct platform_driver twl6030_usb_driver = {
.dev_groups = twl6030_groups,
},
};
-
-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.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: phy: Convert to subsys_platform_driver()
2026-11-04 11:34 [PATCH] usb: phy: Convert to subsys_platform_driver() Peng Fan (OSS)
@ 2026-11-04 11:40 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-04 11:40 UTC (permalink / raw)
To: Peng Fan (OSS); +Cc: linux-usb
> From: Peng Fan <peng.fan@nxp.com>
>
> Replace the open-coded subsys_initcall()/module_exit() platform driver
> registration with subsys_platform_driver().
>
> No functional change.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104113412.1634294-1-peng.fan@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-04 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 11:34 [PATCH] usb: phy: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 11:40 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox