hwmon: convert drivers/hwmon/* to use module_spi_driver()
This patch converts the drivers in drivers/hwmon/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Sonic Zhang <sonic.zhang@analog.com> Cc: Marc Pignat <marc.pignat@hevs.ch> Cc: Paul Thomas <pthomas8589@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
@@ -213,18 +213,7 @@ static struct spi_driver lm70_driver = {
|
||||
.remove = __devexit_p(lm70_remove),
|
||||
};
|
||||
|
||||
static int __init init_lm70(void)
|
||||
{
|
||||
return spi_register_driver(&lm70_driver);
|
||||
}
|
||||
|
||||
static void __exit cleanup_lm70(void)
|
||||
{
|
||||
spi_unregister_driver(&lm70_driver);
|
||||
}
|
||||
|
||||
module_init(init_lm70);
|
||||
module_exit(cleanup_lm70);
|
||||
module_spi_driver(lm70_driver);
|
||||
|
||||
MODULE_AUTHOR("Kaiwan N Billimoria");
|
||||
MODULE_DESCRIPTION("NS LM70 / TI TMP121/TMP123 Linux driver");
|
||||
|
Reference in New Issue
Block a user