aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@ew.tq-group.com>2025-07-25 09:07:50 +0200
committerLee Jones <lee@kernel.org>2025-10-01 10:28:06 +0100
commit557b09699b06f88ad2cb64747e4e8b6fc6e7141b (patch)
treee4a803bc9543ab27f7acb2bad09688082230a6ca
parentmfd: stmpe-spi: Use module_spi_driver to remove boilerplate (diff)
downloadlinux-557b09699b06f88ad2cb64747e4e8b6fc6e7141b.tar.gz
linux-557b09699b06f88ad2cb64747e4e8b6fc6e7141b.zip
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@ew.tq-group.com> Link: https://lore.kernel.org/r/20250725070752.338376-3-alexander.stein@ew.tq-group.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/mfd/stmpe-i2c.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index fe018bedab98..145836320c17 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>");