* [PATCH 0/2] spi: convert to subsys_platform_driver()
@ 2026-11-07 0:33 Brian Masney
2026-11-07 0:33 ` [PATCH 1/2] spi: omap-uwire: " Brian Masney
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Brian Masney @ 2026-11-07 0:33 UTC (permalink / raw)
To: Mark Brown, Andy Shevchenko, Daniel Mack, Haojian Zhuang,
Robert Jarzmik
Cc: linux-spi, linux-kernel, linux-arm-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 (2):
spi: omap-uwire: convert to subsys_platform_driver()
spi: pxa2xx: convert to subsys_platform_driver()
drivers/spi/spi-omap-uwire.c | 14 +-------------
drivers/spi/spi-pxa2xx-platform.c | 14 ++------------
2 files changed, 3 insertions(+), 25 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-spi-subsys-32156ad80403
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] spi: omap-uwire: convert to subsys_platform_driver() 2026-11-07 0:33 [PATCH 0/2] spi: convert to subsys_platform_driver() Brian Masney @ 2026-11-07 0:33 ` Brian Masney 2026-11-07 0:33 ` [PATCH 2/2] spi: pxa2xx: " Brian Masney 2026-11-09 19:14 ` [PATCH 0/2] spi: " Mark Brown 2 siblings, 0 replies; 6+ messages in thread From: Brian Masney @ 2026-11-07 0:33 UTC (permalink / raw) To: Mark Brown, Andy Shevchenko, Daniel Mack, Haojian Zhuang, Robert Jarzmik Cc: linux-spi, linux-kernel, linux-arm-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/spi/spi-omap-uwire.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 83e263eb6069..91bd733ca15d 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c @@ -528,19 +528,7 @@ static struct platform_driver uwire_driver = { // resume ... use ck }; -static int __init omap_uwire_init(void) -{ - return platform_driver_register(&uwire_driver); -} - -static void __exit omap_uwire_exit(void) -{ - platform_driver_unregister(&uwire_driver); -} - -subsys_initcall(omap_uwire_init); -module_exit(omap_uwire_exit); +subsys_platform_driver(uwire_driver); MODULE_DESCRIPTION("MicroWire interface driver for OMAP"); MODULE_LICENSE("GPL"); - -- 2.56.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] spi: pxa2xx: convert to subsys_platform_driver() 2026-11-07 0:33 [PATCH 0/2] spi: convert to subsys_platform_driver() Brian Masney 2026-11-07 0:33 ` [PATCH 1/2] spi: omap-uwire: " Brian Masney @ 2026-11-07 0:33 ` Brian Masney 2026-11-09 19:14 ` [PATCH 0/2] spi: " Mark Brown 2 siblings, 0 replies; 6+ messages in thread From: Brian Masney @ 2026-11-07 0:33 UTC (permalink / raw) To: Mark Brown, Andy Shevchenko, Daniel Mack, Haojian Zhuang, Robert Jarzmik Cc: linux-spi, linux-kernel, linux-arm-kernel, Brian Masney Reduce boilerplate code in this driver and convert it over to use the macro subsys_platform_driver(). Note that this needs to rename the driver variable to pxa2xx_spi_driver to avoid a compilation error with the macro. Signed-off-by: Brian Masney <bmasney@redhat.com> --- drivers/spi/spi-pxa2xx-platform.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-pxa2xx-platform.c b/drivers/spi/spi-pxa2xx-platform.c index 849a14cd0343..2151ed168e57 100644 --- a/drivers/spi/spi-pxa2xx-platform.c +++ b/drivers/spi/spi-pxa2xx-platform.c @@ -198,7 +198,7 @@ static const struct of_device_id pxa2xx_spi_of_match[] = { }; MODULE_DEVICE_TABLE(of, pxa2xx_spi_of_match); -static struct platform_driver driver = { +static struct platform_driver pxa2xx_spi_driver = { .driver = { .name = "pxa2xx-spi", .pm = pm_ptr(&pxa2xx_spi_pm_ops), @@ -209,17 +209,7 @@ static struct platform_driver driver = { .remove = pxa2xx_spi_platform_remove, }; -static int __init pxa2xx_spi_init(void) -{ - return platform_driver_register(&driver); -} -subsys_initcall(pxa2xx_spi_init); - -static void __exit pxa2xx_spi_exit(void) -{ - platform_driver_unregister(&driver); -} -module_exit(pxa2xx_spi_exit); +subsys_platform_driver(pxa2xx_spi_driver); MODULE_AUTHOR("Stephen Street"); MODULE_DESCRIPTION("PXA2xx SSP SPI Controller platform driver"); -- 2.56.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] spi: convert to subsys_platform_driver() 2026-11-07 0:33 [PATCH 0/2] spi: convert to subsys_platform_driver() Brian Masney 2026-11-07 0:33 ` [PATCH 1/2] spi: omap-uwire: " Brian Masney 2026-11-07 0:33 ` [PATCH 2/2] spi: pxa2xx: " Brian Masney @ 2026-11-09 19:14 ` Mark Brown 2026-11-09 21:10 ` Brian Masney 2 siblings, 1 reply; 6+ messages in thread From: Mark Brown @ 2026-11-09 19:14 UTC (permalink / raw) To: Brian Masney Cc: Andy Shevchenko, Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel [-- Attachment #1: Type: text/plain, Size: 239 bytes --] On Fri, Nov 06, 2026 at 07:33:07PM -0500, Brian Masney wrote: > Reduce boilerplate code in these drivers and convert them over to use > the macro subsys_platform_driver(). This doesn't apply against current code, please check and resend. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] spi: convert to subsys_platform_driver() 2026-11-09 19:14 ` [PATCH 0/2] spi: " Mark Brown @ 2026-11-09 21:10 ` Brian Masney 2026-11-10 0:50 ` Peng Fan 0 siblings, 1 reply; 6+ messages in thread From: Brian Masney @ 2026-11-09 21:10 UTC (permalink / raw) To: Mark Brown, Peng Fan Cc: Andy Shevchenko, Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel Hi Mark, On Mon, Nov 09, 2026 at 07:14:33PM +0000, Mark Brown wrote: > On Fri, Nov 06, 2026 at 07:33:07PM -0500, Brian Masney wrote: > > Reduce boilerplate code in these drivers and convert them over to use > > the macro subsys_platform_driver(). > > This doesn't apply against current code, please check and resend. I see that Peng Fan already beat me to this! There's nothing else to add from my series, so there will be no follow up from me. Peng: Just a heads up that I posted patches across the tree Friday for this migrated. I think I changed everything that can be easily migrated. I suspect we may have collided in other subsystems. Brian ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] spi: convert to subsys_platform_driver() 2026-11-09 21:10 ` Brian Masney @ 2026-11-10 0:50 ` Peng Fan 0 siblings, 0 replies; 6+ messages in thread From: Peng Fan @ 2026-11-10 0:50 UTC (permalink / raw) To: Brian Masney Cc: Mark Brown, Peng Fan, Andy Shevchenko, Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-spi, linux-kernel, linux-arm-kernel Hi Brian, On Mon, Nov 09, 2026 at 04:10:05PM -0500, Brian Masney wrote: >Hi Mark, > >On Mon, Nov 09, 2026 at 07:14:33PM +0000, Mark Brown wrote: >> On Fri, Nov 06, 2026 at 07:33:07PM -0500, Brian Masney wrote: >> > Reduce boilerplate code in these drivers and convert them over to use >> > the macro subsys_platform_driver(). >> >> This doesn't apply against current code, please check and resend. > >I see that Peng Fan already beat me to this! There's nothing else to add >from my series, so there will be no follow up from me. > >Peng: Just a heads up that I posted patches across the tree Friday for >this migrated. I think I changed everything that can be easily migrated. >I suspect we may have collided in other subsystems. Thanks for the heads up. I wasn't aware of your earlier treewide conversion series. Sorry for the duplicated effort. I generated these conversions using a Coccinelle rule and it appears to have covered most of the straightforward subsys_platform_driver() conversions across the tree. If there are any overlaps in other subsystems, I can the corresponding parts from my series. Thanks Peng > >Brian > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-10 0:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-07 0:33 [PATCH 0/2] spi: convert to subsys_platform_driver() Brian Masney 2026-11-07 0:33 ` [PATCH 1/2] spi: omap-uwire: " Brian Masney 2026-11-07 0:33 ` [PATCH 2/2] spi: pxa2xx: " Brian Masney 2026-11-09 19:14 ` [PATCH 0/2] spi: " Mark Brown 2026-11-09 21:10 ` Brian Masney 2026-11-10 0:50 ` Peng Fan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox