diff options
Diffstat (limited to 'drivers/mfd/stmpe-spi.c')
| -rw-r--r-- | drivers/mfd/stmpe-spi.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c index f8b14ab8b9d7..dea31efface6 100644 --- a/drivers/mfd/stmpe-spi.c +++ b/drivers/mfd/stmpe-spi.c @@ -1,9 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * ST Microelectronics MFD: stmpe's spi client specific driver * * Copyright (C) ST Microelectronics SA 2011 * - * License Terms: GNU General Public License, version 2 * Author: Viresh Kumar <vireshk@kernel.org> for ST Microelectronics */ @@ -102,11 +102,11 @@ stmpe_spi_probe(struct spi_device *spi) return stmpe_probe(&spi_ci, id->driver_data); } -static int stmpe_spi_remove(struct spi_device *spi) +static void stmpe_spi_remove(struct spi_device *spi) { struct stmpe *stmpe = spi_get_drvdata(spi); - return stmpe_remove(stmpe); + stmpe_remove(stmpe); } static const struct of_device_id stmpe_spi_of_match[] = { @@ -129,33 +129,20 @@ static const struct spi_device_id stmpe_spi_id[] = { { "stmpe2403", STMPE2403 }, { } }; -MODULE_DEVICE_TABLE(spi, stmpe_id); +MODULE_DEVICE_TABLE(spi, stmpe_spi_id); static struct spi_driver stmpe_spi_driver = { .driver = { .name = "stmpe-spi", .of_match_table = of_match_ptr(stmpe_spi_of_match), -#ifdef CONFIG_PM - .pm = &stmpe_dev_pm_ops, -#endif + .pm = pm_sleep_ptr(&stmpe_dev_pm_ops), }, .probe = stmpe_spi_probe, .remove = stmpe_spi_remove, .id_table = stmpe_spi_id, }; +module_spi_driver(stmpe_spi_driver); -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_LICENSE("GPL v2"); MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver"); MODULE_AUTHOR("Viresh Kumar <vireshk@kernel.org>"); +MODULE_LICENSE("GPL"); |
