projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57bf2a3
)
mfd: stmpe-spi: Use module_spi_driver to remove boilerplate
author
Alexander Stein
<alexander.stein@ew.tq-group.com>
Fri, 25 Jul 2025 07:07:49 +0000
(09:07 +0200)
committer
Lee Jones
<lee@kernel.org>
Wed, 1 Oct 2025 09:28:06 +0000
(10:28 +0100)
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>
Link:
https://lore.kernel.org/r/20250725070752.338376-2-alexander.stein@ew.tq-group.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/stmpe-spi.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/stmpe-spi.c
b/drivers/mfd/stmpe-spi.c
index
b9cc85e
..
7fee641
100644
(file)
--- 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>");