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:
@@ -167,17 +167,7 @@ static struct spi_driver ad7314_driver = {
|
||||
.id_table = ad7314_id,
|
||||
};
|
||||
|
||||
static __init int ad7314_init(void)
|
||||
{
|
||||
return spi_register_driver(&ad7314_driver);
|
||||
}
|
||||
module_init(ad7314_init);
|
||||
|
||||
static __exit void ad7314_exit(void)
|
||||
{
|
||||
spi_unregister_driver(&ad7314_driver);
|
||||
}
|
||||
module_exit(ad7314_exit);
|
||||
module_spi_driver(ad7314_driver);
|
||||
|
||||
MODULE_AUTHOR("Sonic Zhang <sonic.zhang@analog.com>");
|
||||
MODULE_DESCRIPTION("Analog Devices AD7314, ADT7301 and ADT7302 digital"
|
||||
|
Reference in New Issue
Block a user