ALSA: Convert at73c213 to module_spi_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 27 Jan 2012 07:29:13 +0000 (15:29 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 27 Jan 2012 14:18:36 +0000 (15:18 +0100)
This patch converts at73c213 to use the module_spi_driver()
macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/spi/at73c213.c

index 4dd051bdf4fd1365498cc0740173d95b3b4bdc60..c6500d00053b21314086f9d88f8dcd72e91e4cc7 100644 (file)
@@ -1112,17 +1112,7 @@ static struct spi_driver at73c213_driver = {
        .remove         = __devexit_p(snd_at73c213_remove),
 };
 
-static int __init at73c213_init(void)
-{
-       return spi_register_driver(&at73c213_driver);
-}
-module_init(at73c213_init);
-
-static void __exit at73c213_exit(void)
-{
-       spi_unregister_driver(&at73c213_driver);
-}
-module_exit(at73c213_exit);
+module_spi_driver(at73c213_driver);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
 MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC");