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/gyro/adis16260_core.c | |
parent | 6e5af184f810f6150e07339bd23a09c498739c82 (diff) | |
download | linux-fsl-qoriq-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/gyro/adis16260_core.c')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index aaa3967..886dddf 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -711,18 +711,7 @@ static struct spi_driver adis16260_driver = { .remove = __devexit_p(adis16260_remove), .id_table = adis16260_id, }; - -static __init int adis16260_init(void) -{ - return spi_register_driver(&adis16260_driver); -} -module_init(adis16260_init); - -static __exit void adis16260_exit(void) -{ - spi_unregister_driver(&adis16260_driver); -} -module_exit(adis16260_exit); +module_spi_driver(adis16260_driver); MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>"); MODULE_DESCRIPTION("Analog Devices ADIS16260/5 Digital Gyroscope Sensor"); |