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/dds/ad9834.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/dds/ad9834.c')
-rw-r--r-- | drivers/staging/iio/dds/ad9834.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/dds/ad9834.c b/drivers/staging/iio/dds/ad9834.c index c468f69..2b31e35 100644 --- a/drivers/staging/iio/dds/ad9834.c +++ b/drivers/staging/iio/dds/ad9834.c @@ -446,18 +446,7 @@ static struct spi_driver ad9834_driver = { .remove = __devexit_p(ad9834_remove), .id_table = ad9834_id, }; - -static int __init ad9834_init(void) -{ - return spi_register_driver(&ad9834_driver); -} -module_init(ad9834_init); - -static void __exit ad9834_exit(void) -{ - spi_unregister_driver(&ad9834_driver); -} -module_exit(ad9834_exit); +module_spi_driver(ad9834_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("Analog Devices AD9833/AD9834/AD9837/AD9838 DDS"); |