mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] gpio: convert to subsys_platform_driver() and subsys_platform_driver_probe()
@ 2026-11-07  0:08 Brian Masney
  2026-11-07  0:08 ` [PATCH 1/2] gpio: htc-egpio: convert to subsys_platform_driver_probe() Brian Masney
  2026-11-07  0:08 ` [PATCH 2/2] gpio: tps6586x: convert to subsys_platform_driver() Brian Masney
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Masney @ 2026-11-07  0:08 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, linux-kernel, Brian Masney

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

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
Brian Masney (2):
      gpio: htc-egpio: convert to subsys_platform_driver_probe()
      gpio: tps6586x: convert to subsys_platform_driver()

 drivers/gpio/gpio-htc-egpio.c | 6 +-----
 drivers/gpio/gpio-tps6586x.c  | 6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-gpio-subsys-d69c66fb9fff

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


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

* [PATCH 1/2] gpio: htc-egpio: convert to subsys_platform_driver_probe()
  2026-11-07  0:08 [PATCH 0/2] gpio: convert to subsys_platform_driver() and subsys_platform_driver_probe() Brian Masney
@ 2026-11-07  0:08 ` Brian Masney
  2026-11-07  0:08 ` [PATCH 2/2] gpio: tps6586x: convert to subsys_platform_driver() Brian Masney
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Masney @ 2026-11-07  0:08 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, linux-kernel, Brian Masney

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

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
 drivers/gpio/gpio-htc-egpio.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 25a4d4494f3c..0e108d4236d2 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -395,9 +395,5 @@ static struct platform_driver egpio_driver = {
 	},
 };
 
-static int __init egpio_init(void)
-{
-	return platform_driver_probe(&egpio_driver, egpio_probe);
-}
 /* start early for dependencies */
-subsys_initcall(egpio_init);
+subsys_platform_driver_probe(egpio_driver, egpio_probe);

-- 
2.56.0


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

* [PATCH 2/2] gpio: tps6586x: convert to subsys_platform_driver()
  2026-11-07  0:08 [PATCH 0/2] gpio: convert to subsys_platform_driver() and subsys_platform_driver_probe() Brian Masney
  2026-11-07  0:08 ` [PATCH 1/2] gpio: htc-egpio: convert to subsys_platform_driver_probe() Brian Masney
@ 2026-11-07  0:08 ` Brian Masney
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Masney @ 2026-11-07  0:08 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, 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/gpio/gpio-tps6586x.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-tps6586x.c b/drivers/gpio/gpio-tps6586x.c
index aaacbb54bf5d..e19af562ec3a 100644
--- a/drivers/gpio/gpio-tps6586x.c
+++ b/drivers/gpio/gpio-tps6586x.c
@@ -116,8 +116,4 @@ static struct platform_driver tps6586x_gpio_driver = {
 	.probe		= tps6586x_gpio_probe,
 };
 
-static int __init tps6586x_gpio_init(void)
-{
-	return platform_driver_register(&tps6586x_gpio_driver);
-}
-subsys_initcall(tps6586x_gpio_init);
+subsys_platform_driver(tps6586x_gpio_driver);

-- 
2.56.0


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07  0:08 [PATCH 0/2] gpio: convert to subsys_platform_driver() and subsys_platform_driver_probe() Brian Masney
2026-11-07  0:08 ` [PATCH 1/2] gpio: htc-egpio: convert to subsys_platform_driver_probe() Brian Masney
2026-11-07  0:08 ` [PATCH 2/2] gpio: tps6586x: convert to subsys_platform_driver() 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®