ASoC: Convert au1x directory to module_platform_driver
authorAxel Lin <axel.lin@gmail.com>
Fri, 25 Nov 2011 02:06:59 +0000 (10:06 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 25 Nov 2011 13:15:16 +0000 (13:15 +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/au1x/db1000.c
sound/soc/au1x/db1200.c
sound/soc/au1x/dbdma2.c
sound/soc/au1x/dma.c
sound/soc/au1x/i2sc.c
sound/soc/au1x/psc-i2s.c

index 127477a5e0c775ad8778eaf0fba722f161ce8697..094a20723bc6dba62ff60233a72afaa588fba9c1 100644 (file)
@@ -57,18 +57,7 @@ static struct platform_driver db1000_audio_driver = {
        .remove         = __devexit_p(db1000_audio_remove),
 };
 
-static int __init db1000_audio_load(void)
-{
-       return platform_driver_register(&db1000_audio_driver);
-}
-
-static void __exit db1000_audio_unload(void)
-{
-       platform_driver_unregister(&db1000_audio_driver);
-}
-
-module_init(db1000_audio_load);
-module_exit(db1000_audio_unload);
+module_platform_driver(db1000_audio_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("DB1000/DB1500/DB1100 ASoC audio");
index 289312c14b99bf62d13355e7ae5e585bf297991f..80733331733fb103ef37d112b73bbb87310b1a2b 100644 (file)
@@ -133,18 +133,7 @@ static struct platform_driver db1200_audio_driver = {
        .remove         = __devexit_p(db1200_audio_remove),
 };
 
-static int __init db1200_audio_load(void)
-{
-       return platform_driver_register(&db1200_audio_driver);
-}
-
-static void __exit db1200_audio_unload(void)
-{
-       platform_driver_unregister(&db1200_audio_driver);
-}
-
-module_init(db1200_audio_load);
-module_exit(db1200_audio_unload);
+module_platform_driver(db1200_audio_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("DB1200 ASoC audio support");
index d7d04e26eee504524f7952c86825b44c5d7a4fa7..09699de9b33760813fcbae541d271ad3fa2a5342 100644 (file)
@@ -384,18 +384,7 @@ static struct platform_driver au1xpsc_pcm_driver = {
        .remove         = __devexit_p(au1xpsc_pcm_drvremove),
 };
 
-static int __init au1xpsc_audio_dbdma_load(void)
-{
-       return platform_driver_register(&au1xpsc_pcm_driver);
-}
-
-static void __exit au1xpsc_audio_dbdma_unload(void)
-{
-       platform_driver_unregister(&au1xpsc_pcm_driver);
-}
-
-module_init(au1xpsc_audio_dbdma_load);
-module_exit(au1xpsc_audio_dbdma_unload);
+module_platform_driver(au1xpsc_pcm_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Au12x0/Au1550 PSC Audio DMA driver");
index 177f7137a9c80e358aa4c6913cfafce00585e11d..dc4dae48aed951b41b1af0554baed69d6824c7f9 100644 (file)
@@ -359,18 +359,7 @@ static struct platform_driver alchemy_pcmdma_driver = {
        .remove         = __devexit_p(alchemy_pcm_drvremove),
 };
 
-static int __init alchemy_pcmdma_load(void)
-{
-       return platform_driver_register(&alchemy_pcmdma_driver);
-}
-
-static void __exit alchemy_pcmdma_unload(void)
-{
-       platform_driver_unregister(&alchemy_pcmdma_driver);
-}
-
-module_init(alchemy_pcmdma_load);
-module_exit(alchemy_pcmdma_unload);
+module_platform_driver(alchemy_pcmdma_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Au1000/Au1500/Au1100 Audio DMA driver");
index 6bcf48f5884c169b0a5d61004bb91f7652647b35..cb53ad87d0a99a71a25e2af85ba2457939484ae0 100644 (file)
@@ -331,18 +331,7 @@ static struct platform_driver au1xi2s_driver = {
        .remove         = __devexit_p(au1xi2s_drvremove),
 };
 
-static int __init au1xi2s_load(void)
-{
-       return platform_driver_register(&au1xi2s_driver);
-}
-
-static void __exit au1xi2s_unload(void)
-{
-       platform_driver_unregister(&au1xi2s_driver);
-}
-
-module_init(au1xi2s_load);
-module_exit(au1xi2s_unload);
+module_platform_driver(au1xi2s_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Au1000/1500/1100 I2S ASoC driver");
index f7714d50bdaffda36814aa949b5f6b1428ca9ae8..5c1dc8a141abed9881a09d643b2181994340a319 100644 (file)
@@ -435,18 +435,7 @@ static struct platform_driver au1xpsc_i2s_driver = {
        .remove         = __devexit_p(au1xpsc_i2s_drvremove),
 };
 
-static int __init au1xpsc_i2s_load(void)
-{
-       return platform_driver_register(&au1xpsc_i2s_driver);
-}
-
-static void __exit au1xpsc_i2s_unload(void)
-{
-       platform_driver_unregister(&au1xpsc_i2s_driver);
-}
-
-module_init(au1xpsc_i2s_load);
-module_exit(au1xpsc_i2s_unload);
+module_platform_driver(au1xpsc_i2s_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Au12x0/Au1550 PSC I2S ALSA ASoC audio driver");