staging:iio: Convert remaining drivers to module_spi_driver
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 20 Feb 2012 18:42:38 +0000 (19:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 20:11:13 +0000 (12:11 -0800)
Convert the IIO drivers which have not been converted yet to module_spi_driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/dac/ad5421.c
drivers/staging/iio/dac/ad5764.c

index 71ee868..0b040b2 100644 (file)
@@ -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 <lars@metafoo.de>");
 MODULE_DESCRIPTION("Analog Devices AD5421 DAC");
index ff91480..f73a730 100644 (file)
@@ -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 <lars@metafoo.de>");
 MODULE_DESCRIPTION("Analog Devices AD5744/AD5744R/AD5764/AD5764R DAC");