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/ad9850.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/ad9850.c')
-rw-r--r-- | drivers/staging/iio/dds/ad9850.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/staging/iio/dds/ad9850.c b/drivers/staging/iio/dds/ad9850.c index a14771b..f9c96af 100644 --- a/drivers/staging/iio/dds/ad9850.c +++ b/drivers/staging/iio/dds/ad9850.c @@ -129,18 +129,7 @@ static struct spi_driver ad9850_driver = { .probe = ad9850_probe, .remove = __devexit_p(ad9850_remove), }; - -static __init int ad9850_spi_init(void) -{ - return spi_register_driver(&ad9850_driver); -} -module_init(ad9850_spi_init); - -static __exit void ad9850_spi_exit(void) -{ - spi_unregister_driver(&ad9850_driver); -} -module_exit(ad9850_spi_exit); +module_spi_driver(ad9850_driver); MODULE_AUTHOR("Cliff Cai"); MODULE_DESCRIPTION("Analog Devices ad9850 driver"); |