From 519ff1d2878e34de5bf68337ac29f2f1f50da159 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 20 Feb 2012 19:42:38 +0100 Subject: [PATCH] staging:iio: Convert remaining drivers to module_spi_driver Convert the IIO drivers which have not been converted yet to module_spi_driver. Signed-off-by: Lars-Peter Clausen Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/dac/ad5421.c | 13 +------------ drivers/staging/iio/dac/ad5764.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/staging/iio/dac/ad5421.c b/drivers/staging/iio/dac/ad5421.c index 71ee86824763..0b040b204697 100644 --- a/drivers/staging/iio/dac/ad5421.c +++ b/drivers/staging/iio/dac/ad5421.c @@ -536,18 +536,7 @@ static struct spi_driver ad5421_driver = { .probe = ad5421_probe, .remove = __devexit_p(ad5421_remove), }; - -static __init int ad5421_init(void) -{ - return spi_register_driver(&ad5421_driver); -} -module_init(ad5421_init); - -static __exit void ad5421_exit(void) -{ - spi_unregister_driver(&ad5421_driver); -} -module_exit(ad5421_exit); +module_spi_driver(ad5421_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_DESCRIPTION("Analog Devices AD5421 DAC"); diff --git a/drivers/staging/iio/dac/ad5764.c b/drivers/staging/iio/dac/ad5764.c index ff91480ae65c..f73a73079490 100644 --- a/drivers/staging/iio/dac/ad5764.c +++ b/drivers/staging/iio/dac/ad5764.c @@ -375,18 +375,7 @@ static struct spi_driver ad5764_driver = { .remove = __devexit_p(ad5764_remove), .id_table = ad5764_ids, }; - -static int __init ad5764_spi_init(void) -{ - return spi_register_driver(&ad5764_driver); -} -module_init(ad5764_spi_init); - -static void __exit ad5764_spi_exit(void) -{ - spi_unregister_driver(&ad5764_driver); -} -module_exit(ad5764_spi_exit); +module_spi_driver(ad5764_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_DESCRIPTION("Analog Devices AD5744/AD5744R/AD5764/AD5764R DAC"); -- 2.20.1