ASoC: Convert kirkwood directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Thu, 24 Nov 2011 03:43:09 +0000 (11:43 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Nov 2011 10:45:20 +0000 (10:45 +0000)
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/kirkwood/kirkwood-dma.c
sound/soc/kirkwood/kirkwood-i2s.c

index cd33de1c5b7a88bead8fe1c3ee25ae1bb6752c32..210438261a49fab17aeb6fe857846e9bccba74e7 100644 (file)
@@ -388,17 +388,7 @@ static struct platform_driver kirkwood_pcm_driver = {
        .remove = __devexit_p(kirkwood_soc_platform_remove),
 };
 
-static int __init kirkwood_pcm_init(void)
-{
-       return platform_driver_register(&kirkwood_pcm_driver);
-}
-module_init(kirkwood_pcm_init);
-
-static void __exit kirkwood_pcm_exit(void)
-{
-       platform_driver_unregister(&kirkwood_pcm_driver);
-}
-module_exit(kirkwood_pcm_exit);
+module_platform_driver(kirkwood_pcm_driver);
 
 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
 MODULE_DESCRIPTION("Marvell Kirkwood Audio DMA module");
index 2b212dcb9ac7094386302560a66920e592b7b8d8..f6bb211568769b897a2809a28679bf7aee373ace 100644 (file)
@@ -483,17 +483,7 @@ static struct platform_driver kirkwood_i2s_driver = {
        },
 };
 
-static int __init kirkwood_i2s_init(void)
-{
-       return platform_driver_register(&kirkwood_i2s_driver);
-}
-module_init(kirkwood_i2s_init);
-
-static void __exit kirkwood_i2s_exit(void)
-{
-       platform_driver_unregister(&kirkwood_i2s_driver);
-}
-module_exit(kirkwood_i2s_exit);
+module_platform_driver(kirkwood_i2s_driver);
 
 /* Module information */
 MODULE_AUTHOR("Arnaud Patard, <arnaud.patard@rtp-net.org>");