summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/adcxx.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-20 08:53:47 +0100
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-19 02:26:51 +0100
commit91efffe26a809bc6660b91e21264f48e501bfb46 (patch)
tree120b44641f98226023ae64b2d491de961795c824 /drivers/hwmon/adcxx.c
parenthwmon: convert drivers/hwmon/* to use module_i2c_driver() (diff)
downloadlinux-91efffe26a809bc6660b91e21264f48e501bfb46.tar.xz
linux-91efffe26a809bc6660b91e21264f48e501bfb46.zip
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/adcxx.c')
-rw-r--r--drivers/hwmon/adcxx.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c
index ceb24a365176..a3d3183454ad 100644
--- a/drivers/hwmon/adcxx.c
+++ b/drivers/hwmon/adcxx.c
@@ -248,18 +248,7 @@ static struct spi_driver adcxx_driver = {
.remove = __devexit_p(adcxx_remove),
};
-static int __init init_adcxx(void)
-{
- return spi_register_driver(&adcxx_driver);
-}
-
-static void __exit exit_adcxx(void)
-{
- spi_unregister_driver(&adcxx_driver);
-}
-
-module_init(init_adcxx);
-module_exit(exit_adcxx);
+module_spi_driver(adcxx_driver);
MODULE_AUTHOR("Marc Pignat");
MODULE_DESCRIPTION("National Semiconductor adcxx8sxxx Linux driver");