linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mfd: stmpe: Remove IRQ domain upon removal
@ 2025-07-25  7:07 Alexander Stein
  2025-07-25  7:07 ` [PATCH 2/3] mfd: stmpe-spi: Use module_spi_driver to remove boilerplate Alexander Stein
  2025-07-25  7:07 ` [PATCH 3/3] mfd: stmpe-i2c: Use module_i2c_driver " Alexander Stein
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Stein @ 2025-07-25  7:07 UTC (permalink / raw)
  To: Lee Jones, Maxime Coquelin, Alexandre Torgue
  Cc: Alexander Stein, linux-stm32, linux-arm-kernel, linux-kernel

The IRQ domain is (optionally) added during stmpe_probe, but never removed.
Add the call to stmpe_remove.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/mfd/stmpe.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 819d19dc9b4a9..e1165f63aedae 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1485,6 +1485,9 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
 
 void stmpe_remove(struct stmpe *stmpe)
 {
+	if (stmpe->domain)
+		irq_domain_remove(stmpe->domain);
+
 	if (!IS_ERR(stmpe->vio) && regulator_is_enabled(stmpe->vio))
 		regulator_disable(stmpe->vio);
 	if (!IS_ERR(stmpe->vcc) && regulator_is_enabled(stmpe->vcc))
-- 
2.43.0



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

* [PATCH 2/3] mfd: stmpe-spi: Use module_spi_driver to remove boilerplate
  2025-07-25  7:07 [PATCH 1/3] mfd: stmpe: Remove IRQ domain upon removal Alexander Stein
@ 2025-07-25  7:07 ` Alexander Stein
  2025-07-25  7:07 ` [PATCH 3/3] mfd: stmpe-i2c: Use module_i2c_driver " Alexander Stein
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2025-07-25  7:07 UTC (permalink / raw)
  To: Lee Jones, Maxime Coquelin, Alexandre Torgue
  Cc: Alexander Stein, linux-stm32, linux-arm-kernel, linux-kernel

Driver implements feature of module_spi_driver() manually. Replace it by
that macro instead.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/mfd/stmpe-spi.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c
index b9cc85ea2c401..7fee64102cae7 100644
--- a/drivers/mfd/stmpe-spi.c
+++ b/drivers/mfd/stmpe-spi.c
@@ -141,18 +141,7 @@ static struct spi_driver stmpe_spi_driver = {
 	.remove		= stmpe_spi_remove,
 	.id_table	= stmpe_spi_id,
 };
-
-static int __init stmpe_init(void)
-{
-	return spi_register_driver(&stmpe_spi_driver);
-}
-subsys_initcall(stmpe_init);
-
-static void __exit stmpe_exit(void)
-{
-	spi_unregister_driver(&stmpe_spi_driver);
-}
-module_exit(stmpe_exit);
+module_spi_driver(stmpe_spi_driver);
 
 MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver");
 MODULE_AUTHOR("Viresh Kumar <vireshk@kernel.org>");
-- 
2.43.0



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

* [PATCH 3/3] mfd: stmpe-i2c: Use module_i2c_driver to remove boilerplate
  2025-07-25  7:07 [PATCH 1/3] mfd: stmpe: Remove IRQ domain upon removal Alexander Stein
  2025-07-25  7:07 ` [PATCH 2/3] mfd: stmpe-spi: Use module_spi_driver to remove boilerplate Alexander Stein
@ 2025-07-25  7:07 ` Alexander Stein
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2025-07-25  7:07 UTC (permalink / raw)
  To: Lee Jones, Maxime Coquelin, Alexandre Torgue
  Cc: Alexander Stein, linux-stm32, linux-arm-kernel, linux-kernel

Driver implements feature of module_i2c_driver() manually. Replace it by
that macro instead.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/mfd/stmpe-i2c.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index fe018bedab983..145836320c170 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -122,18 +122,7 @@ static struct i2c_driver stmpe_i2c_driver = {
 	.remove		= stmpe_i2c_remove,
 	.id_table	= stmpe_i2c_id,
 };
-
-static int __init stmpe_init(void)
-{
-	return i2c_add_driver(&stmpe_i2c_driver);
-}
-subsys_initcall(stmpe_init);
-
-static void __exit stmpe_exit(void)
-{
-	i2c_del_driver(&stmpe_i2c_driver);
-}
-module_exit(stmpe_exit);
+module_i2c_driver(stmpe_i2c_driver);
 
 MODULE_DESCRIPTION("STMPE MFD I2C Interface Driver");
 MODULE_AUTHOR("Rabin Vincent <rabin.vincent@stericsson.com>");
-- 
2.43.0



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

end of thread, other threads:[~2025-07-25  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25  7:07 [PATCH 1/3] mfd: stmpe: Remove IRQ domain upon removal Alexander Stein
2025-07-25  7:07 ` [PATCH 2/3] mfd: stmpe-spi: Use module_spi_driver to remove boilerplate Alexander Stein
2025-07-25  7:07 ` [PATCH 3/3] mfd: stmpe-i2c: Use module_i2c_driver " Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).