ASoC: ad1836: Use module_spi_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Aug 2012 11:30:28 +0000 (17:00 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 27 Aug 2012 16:55:28 +0000 (09:55 -0700)
module_spi_driver makes the code simpler by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/ad1836.c

index c67b50d8b3170cd388a1279516a186c9a23e9a99..ae1eb51bc9dafb5ed7fbd400be076664255cb0e5 100644 (file)
@@ -379,17 +379,7 @@ static struct spi_driver ad1836_spi_driver = {
        .id_table       = ad1836_ids,
 };
 
-static int __init ad1836_init(void)
-{
-       return spi_register_driver(&ad1836_spi_driver);
-}
-module_init(ad1836_init);
-
-static void __exit ad1836_exit(void)
-{
-       spi_unregister_driver(&ad1836_spi_driver);
-}
-module_exit(ad1836_exit);
+module_spi_driver(ad1836_spi_driver);
 
 MODULE_DESCRIPTION("ASoC ad1836 driver");
 MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");