diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-16 09:13:39 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-17 20:15:40 (GMT) |
commit | ae6ae6fec3f7d6919e0146996df37b665c75f662 (patch) | |
tree | 4748d81f7f26faffe28fbd19645546a8e23a15ea /drivers/staging/iio/accel/sca3000_core.c | |
parent | 6e5af184f810f6150e07339bd23a09c498739c82 (diff) | |
download | linux-ae6ae6fec3f7d6919e0146996df37b665c75f662.tar.xz |
staging:iio: Use module_spi_driver to register SPI driver
Use the newly introduced module_spi_driver macro for registering SPI drivers.
This allows us to remove a few lines of boilerplate code.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/sca3000_core.c')
-rw-r--r-- | drivers/staging/iio/accel/sca3000_core.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index a44a705..6c35907 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -1250,18 +1250,7 @@ static struct spi_driver sca3000_driver = { .remove = __devexit_p(sca3000_remove), .id_table = sca3000_id, }; - -static __init int sca3000_init(void) -{ - return spi_register_driver(&sca3000_driver); -} -module_init(sca3000_init); - -static __exit void sca3000_exit(void) -{ - spi_unregister_driver(&sca3000_driver); -} -module_exit(sca3000_exit); +module_spi_driver(sca3000_driver); MODULE_AUTHOR("Jonathan Cameron <jic23@cam.ac.uk>"); MODULE_DESCRIPTION("VTI SCA3000 Series Accelerometers SPI driver"); |