[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250725070752.338376-3-alexander.stein@ew.tq-group.com>
Date: Fri, 25 Jul 2025 09:07:50 +0200
From: Alexander Stein <alexander.stein@...tq-group.com>
To: Lee Jones <lee@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc: Alexander Stein <alexander.stein@...tq-group.com>,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] mfd: stmpe-i2c: Use module_i2c_driver to remove boilerplate
Driver implements feature of module_i2c_driver() manually. Replace it by
that macro instead.
Signed-off-by: Alexander Stein <alexander.stein@...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@...ricsson.com>");
--
2.43.0
Powered by blists - more mailing lists