mfd: stmpe-spi: Use module_spi_driver to remove boilerplate

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>
This commit is contained in:
Alexander Stein 2025-07-25 09:07:49 +02:00 committed by Lee Jones
parent 57bf2a312a
commit 57b1fec0be

View File

@ -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>");