diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-20 02:53:47 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 21:26:51 -0400 |
commit | 91efffe26a809bc6660b91e21264f48e501bfb46 (patch) | |
tree | 120b44641f98226023ae64b2d491de961795c824 /drivers/hwmon/max1111.c | |
parent | f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7 (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/max1111.c')
-rw-r--r-- | drivers/hwmon/max1111.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 482ca901db30..e5206ae00d76 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c | |||
@@ -227,17 +227,7 @@ static struct spi_driver max1111_driver = { | |||
227 | .remove = __devexit_p(max1111_remove), | 227 | .remove = __devexit_p(max1111_remove), |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __init max1111_init(void) | 230 | module_spi_driver(max1111_driver); |
231 | { | ||
232 | return spi_register_driver(&max1111_driver); | ||
233 | } | ||
234 | module_init(max1111_init); | ||
235 | |||
236 | static void __exit max1111_exit(void) | ||
237 | { | ||
238 | spi_unregister_driver(&max1111_driver); | ||
239 | } | ||
240 | module_exit(max1111_exit); | ||
241 | 231 | ||
242 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); | 232 | MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"); |
243 | MODULE_DESCRIPTION("MAX1111 ADC Driver"); | 233 | MODULE_DESCRIPTION("MAX1111 ADC Driver"); |