]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: wm8770: Use module_spi_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Aug 2012 11:30:27 +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/wm8770.c

index a5127b4ff9e1881dd49b5d588d3cd354d33cc746..c7c0034d39669a5e4b548bd7a46f40eb716f00cd 100644 (file)
@@ -724,24 +724,7 @@ static struct spi_driver wm8770_spi_driver = {
        .remove = __devexit_p(wm8770_spi_remove)
 };
 
-static int __init wm8770_modinit(void)
-{
-       int ret = 0;
-
-       ret = spi_register_driver(&wm8770_spi_driver);
-       if (ret) {
-               printk(KERN_ERR "Failed to register wm8770 SPI driver: %d\n",
-                      ret);
-       }
-       return ret;
-}
-module_init(wm8770_modinit);
-
-static void __exit wm8770_exit(void)
-{
-       spi_unregister_driver(&wm8770_spi_driver);
-}
-module_exit(wm8770_exit);
+module_spi_driver(wm8770_spi_driver);
 
 MODULE_DESCRIPTION("ASoC WM8770 driver");
 MODULE_AUTHOR("Dimitris Papastamos <dp@opensource.wolfsonmicro.com>");