aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/ad7314.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-20 15:53:47 +0800
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 18:26:51 -0700
commit91efffe26a809bc6660b91e21264f48e501bfb46 (patch)
tree120b44641f98226023ae64b2d491de961795c824 /drivers/hwmon/ad7314.c
parentf0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7 (diff)
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>
Diffstat (limited to 'drivers/hwmon/ad7314.c')
-rw-r--r--drivers/hwmon/ad7314.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c
index 5d760f3d21c..0e0cfcc36f8 100644
--- a/drivers/hwmon/ad7314.c
+++ b/drivers/hwmon/ad7314.c
@@ -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"