From beda5bf575a93823289fbeb868b42e75e9f08d96 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 25 Nov 2011 10:12:16 +0800 Subject: [PATCH] ASoC: Convert omap directory to module_platform_driver Factor out some boilerplate code. Signed-off-by: Axel Lin Acked-by: Jarkko Nikula Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown --- sound/soc/omap/omap-hdmi.c | 12 +----------- sound/soc/omap/omap-mcbsp.c | 12 +----------- sound/soc/omap/omap-mcpdm.c | 12 +----------- sound/soc/omap/omap-pcm.c | 12 +----------- sound/soc/omap/omap4-hdmi-card.c | 12 +----------- 5 files changed, 5 insertions(+), 55 deletions(-) diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c index 9bb1cf8..38e0def 100644 --- a/sound/soc/omap/omap-hdmi.c +++ b/sound/soc/omap/omap-hdmi.c @@ -139,17 +139,7 @@ static struct platform_driver hdmi_dai_driver = { .remove = __devexit_p(omap_hdmi_remove), }; -static int __init hdmi_dai_init(void) -{ - return platform_driver_register(&hdmi_dai_driver); -} -module_init(hdmi_dai_init); - -static void __exit hdmi_dai_exit(void) -{ - platform_driver_unregister(&hdmi_dai_driver); -} -module_exit(hdmi_dai_exit); +module_platform_driver(hdmi_dai_driver); MODULE_AUTHOR("Jorge Candelaria "); MODULE_AUTHOR("Ricardo Neri "); diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index d91e6ef..bd11d25 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -785,17 +785,7 @@ static struct platform_driver asoc_mcbsp_driver = { .remove = __devexit_p(asoc_mcbsp_remove), }; -static int __init snd_omap_mcbsp_init(void) -{ - return platform_driver_register(&asoc_mcbsp_driver); -} -module_init(snd_omap_mcbsp_init); - -static void __exit snd_omap_mcbsp_exit(void) -{ - platform_driver_unregister(&asoc_mcbsp_driver); -} -module_exit(snd_omap_mcbsp_exit); +module_platform_driver(asoc_mcbsp_driver); MODULE_AUTHOR("Jarkko Nikula "); MODULE_DESCRIPTION("OMAP I2S SoC Interface"); diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index cc8ceff..b50ac60 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c @@ -520,17 +520,7 @@ static struct platform_driver asoc_mcpdm_driver = { .remove = __devexit_p(asoc_mcpdm_remove), }; -static int __init snd_omap_mcpdm_init(void) -{ - return platform_driver_register(&asoc_mcpdm_driver); -} -module_init(snd_omap_mcpdm_init); - -static void __exit snd_omap_mcpdm_exit(void) -{ - platform_driver_unregister(&asoc_mcpdm_driver); -} -module_exit(snd_omap_mcpdm_exit); +module_platform_driver(asoc_mcpdm_driver); MODULE_AUTHOR("Misael Lopez Cruz "); MODULE_DESCRIPTION("OMAP PDM SoC Interface"); diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6ede7dc..52a0f63 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -433,17 +433,7 @@ static struct platform_driver omap_pcm_driver = { .remove = __devexit_p(omap_pcm_remove), }; -static int __init snd_omap_pcm_init(void) -{ - return platform_driver_register(&omap_pcm_driver); -} -module_init(snd_omap_pcm_init); - -static void __exit snd_omap_pcm_exit(void) -{ - platform_driver_unregister(&omap_pcm_driver); -} -module_exit(snd_omap_pcm_exit); +module_platform_driver(omap_pcm_driver); MODULE_AUTHOR("Jarkko Nikula "); MODULE_DESCRIPTION("OMAP PCM DMA module"); diff --git a/sound/soc/omap/omap4-hdmi-card.c b/sound/soc/omap/omap4-hdmi-card.c index 8671261..52d471c 100644 --- a/sound/soc/omap/omap4-hdmi-card.c +++ b/sound/soc/omap/omap4-hdmi-card.c @@ -112,17 +112,7 @@ static struct platform_driver omap4_hdmi_driver = { .remove = __devexit_p(omap4_hdmi_remove), }; -static int __init omap4_hdmi_init(void) -{ - return platform_driver_register(&omap4_hdmi_driver); -} -module_init(omap4_hdmi_init); - -static void __exit omap4_hdmi_exit(void) -{ - platform_driver_unregister(&omap4_hdmi_driver); -} -module_exit(omap4_hdmi_exit); +module_platform_driver(omap4_hdmi_driver); MODULE_AUTHOR("Ricardo Neri "); MODULE_DESCRIPTION("OMAP4 HDMI machine ASoC driver"); -- 2.7.4