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 | |
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')
-rw-r--r-- | drivers/staging/iio/dds/ad5930.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9832.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9834.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9850.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9852.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9910.c | 13 | ||||
-rw-r--r-- | drivers/staging/iio/dds/ad9951.c | 13 |
7 files changed, 7 insertions, 84 deletions
diff --git a/drivers/staging/iio/dds/ad5930.c b/drivers/staging/iio/dds/ad5930.c index f5e368b..4a360d0 100644 --- a/drivers/staging/iio/dds/ad5930.c +++ b/drivers/staging/iio/dds/ad5930.c @@ -143,18 +143,7 @@ static struct spi_driver ad5930_driver = { .probe = ad5930_probe, .remove = __devexit_p(ad5930_remove), }; - -static __init int ad5930_spi_init(void) -{ - return spi_register_driver(&ad5930_driver); -} -module_init(ad5930_spi_init); - -static __exit void ad5930_spi_exit(void) -{ - spi_unregister_driver(&ad5930_driver); -} -module_exit(ad5930_spi_exit); +module_spi_driver(ad5930_driver); MODULE_AUTHOR("Cliff Cai"); MODULE_DESCRIPTION("Analog Devices ad5930 driver"); diff --git a/drivers/staging/iio/dds/ad9832.c b/drivers/staging/iio/dds/ad9832.c index 9b4ff60..cc32fd6 100644 --- a/drivers/staging/iio/dds/ad9832.c +++ b/drivers/staging/iio/dds/ad9832.c @@ -355,18 +355,7 @@ static struct spi_driver ad9832_driver = { .remove = __devexit_p(ad9832_remove), .id_table = ad9832_id, }; - -static int __init ad9832_init(void) -{ - return spi_register_driver(&ad9832_driver); -} -module_init(ad9832_init); - -static void __exit ad9832_exit(void) -{ - spi_unregister_driver(&ad9832_driver); -} -module_exit(ad9832_exit); +module_spi_driver(ad9832_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("Analog Devices AD9832/AD9835 DDS"); 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"); 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"); diff --git a/drivers/staging/iio/dds/ad9852.c b/drivers/staging/iio/dds/ad9852.c index cfceaa6..9fc73fd 100644 --- a/drivers/staging/iio/dds/ad9852.c +++ b/drivers/staging/iio/dds/ad9852.c @@ -280,18 +280,7 @@ static struct spi_driver ad9852_driver = { .probe = ad9852_probe, .remove = __devexit_p(ad9852_remove), }; - -static __init int ad9852_spi_init(void) -{ - return spi_register_driver(&ad9852_driver); -} -module_init(ad9852_spi_init); - -static __exit void ad9852_spi_exit(void) -{ - spi_unregister_driver(&ad9852_driver); -} -module_exit(ad9852_spi_exit); +module_spi_driver(ad9852_driver); MODULE_AUTHOR("Cliff Cai"); MODULE_DESCRIPTION("Analog Devices ad9852 driver"); diff --git a/drivers/staging/iio/dds/ad9910.c b/drivers/staging/iio/dds/ad9910.c index da83d2b..57046b0 100644 --- a/drivers/staging/iio/dds/ad9910.c +++ b/drivers/staging/iio/dds/ad9910.c @@ -413,18 +413,7 @@ static struct spi_driver ad9910_driver = { .probe = ad9910_probe, .remove = __devexit_p(ad9910_remove), }; - -static __init int ad9910_spi_init(void) -{ - return spi_register_driver(&ad9910_driver); -} -module_init(ad9910_spi_init); - -static __exit void ad9910_spi_exit(void) -{ - spi_unregister_driver(&ad9910_driver); -} -module_exit(ad9910_spi_exit); +module_spi_driver(ad9910_driver); MODULE_AUTHOR("Cliff Cai"); MODULE_DESCRIPTION("Analog Devices ad9910 driver"); diff --git a/drivers/staging/iio/dds/ad9951.c b/drivers/staging/iio/dds/ad9951.c index 20c1825..d29130e 100644 --- a/drivers/staging/iio/dds/ad9951.c +++ b/drivers/staging/iio/dds/ad9951.c @@ -224,18 +224,7 @@ static struct spi_driver ad9951_driver = { .probe = ad9951_probe, .remove = __devexit_p(ad9951_remove), }; - -static __init int ad9951_spi_init(void) -{ - return spi_register_driver(&ad9951_driver); -} -module_init(ad9951_spi_init); - -static __exit void ad9951_spi_exit(void) -{ - spi_unregister_driver(&ad9951_driver); -} -module_exit(ad9951_spi_exit); +module_spi_driver(ad9951_driver); MODULE_AUTHOR("Cliff Cai"); MODULE_DESCRIPTION("Analog Devices ad9951 driver"); |