]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Register platform drivers
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Dec 2008 19:58:17 +0000 (19:58 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 9 Dec 2008 10:49:28 +0000 (10:49 +0000)
This is done at modprobe time, mirroring current behaviour, except for
mpc5200_psc_i2s where we do registration at the same time as we register
with soc-of-simple. Since the core currently ignores registration this
has no practical impact.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/atmel/atmel-pcm.c
sound/soc/au1x/dbdma2.c
sound/soc/blackfin/bf5xx-ac97-pcm.c
sound/soc/blackfin/bf5xx-i2s-pcm.c
sound/soc/davinci/davinci-pcm.c
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/mpc5200_psc_i2s.c
sound/soc/omap/omap-pcm.c
sound/soc/pxa/pxa2xx-pcm.c
sound/soc/s3c24xx/s3c24xx-pcm.c
sound/soc/sh/dma-sh7760.c

index 8507aa1cd81121b15a487c9a97cfda8705e98972..d6bcb4e6fda01ab7bd2de6ad49ca9a9de6ca800f 100644 (file)
@@ -477,6 +477,18 @@ struct snd_soc_platform atmel_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(atmel_soc_platform);
 
+static int __devinit atmel_pcm_modinit(void)
+{
+       return snd_soc_register_platform(&atmel_soc_platform);
+}
+module_init(atmel_pcm_modinit);
+
+static void __exit atmel_pcm_exit(void)
+{
+       snd_soc_unregister_platform(&atmel_soc_platform);
+}
+module_exit(atmel_pcm_modexit);
+
 MODULE_AUTHOR("Sedji Gaouaou <sedji.gaouaou@atmel.com>");
 MODULE_DESCRIPTION("Atmel PCM module");
 MODULE_LICENSE("GPL");
index 1466d932880026a99cd32f9e339c55fda0c3033f..74c823d60f91b4662184dcf60b76eeb2eaae4303 100644 (file)
@@ -406,11 +406,12 @@ static int __init au1xpsc_audio_dbdma_init(void)
 {
        au1xpsc_audio_pcmdma[PCM_TX] = NULL;
        au1xpsc_audio_pcmdma[PCM_RX] = NULL;
-       return 0;
+       return snd_soc_register_platform(&au1xpsc_soc_platform);
 }
 
 static void __exit au1xpsc_audio_dbdma_exit(void)
 {
+       snd_soc_unregister_platform(&au1xpsc_soc_platform);
 }
 
 module_init(au1xpsc_audio_dbdma_init);
index d3d51bcb4569cac2a4fd69f3b7f18efd01db4e6c..5b27e0d9d0ecde46fe4ceda0464ec36642aae06e 100644 (file)
@@ -451,6 +451,18 @@ struct snd_soc_platform bf5xx_ac97_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(bf5xx_ac97_soc_platform);
 
+static int __devinit bfin_ac97_init(void)
+{
+       return snd_soc_register_platform(&bf5xx_ac97_soc_platform);
+}
+module_init(bfin_ac97_init);
+
+static void __exit bfin_ac97_exit(void)
+{
+       snd_soc_unregister_platform(&bf5xx_ac97_soc_platform);
+}
+module_exit(bfin_ac97_exit);
+
 MODULE_AUTHOR("Cliff Cai");
 MODULE_DESCRIPTION("ADI Blackfin AC97 PCM DMA module");
 MODULE_LICENSE("GPL");
index 61fccf925192e62697908fadcb1e78507125edb3..c58b12a44870942d30466eb481fc4de0c06adbc5 100644 (file)
@@ -283,6 +283,18 @@ struct snd_soc_platform bf5xx_i2s_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(bf5xx_i2s_soc_platform);
 
+static int __devinit bfin_i2s_init(void)
+{
+       return snd_soc_register_platform(&bf5xx_i2s_soc_platform);
+}
+module_init(bfin_i2s_init);
+
+static void __exit bfin_i2s_exit(void)
+{
+       snd_soc_unregister_platform(&bf5xx_i2s_soc_platform);
+}
+module_exit(bfin_i2s_exit);
+
 MODULE_AUTHOR("Cliff Cai");
 MODULE_DESCRIPTION("ADI Blackfin I2S PCM DMA module");
 MODULE_LICENSE("GPL");
index 76feaa657375e3579cee33db8528a3d6e57f4da6..f1b6e02d24ede737aae2f04354faf47a51274854 100644 (file)
@@ -384,6 +384,18 @@ struct snd_soc_platform davinci_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(davinci_soc_platform);
 
+static int __devinit davinci_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&davinci_soc_platform);
+}
+module_init(davinci_soc_platform_init);
+
+static void __exit davinci_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&davinci_soc_platform);
+}
+module_exit(davinci_soc_platform_exit);
+
 MODULE_AUTHOR("Vladimir Barinov");
 MODULE_DESCRIPTION("TI DAVINCI PCM DMA module");
 MODULE_LICENSE("GPL");
index bf92331b4768184c85f4171ca73191ac41d56ed4..646c807163abababef2605d4c06fc63458ef834f 100644 (file)
@@ -853,6 +853,18 @@ int fsl_dma_configure(struct fsl_dma_info *dma_info)
 }
 EXPORT_SYMBOL_GPL(fsl_dma_configure);
 
+static int __devinit fsl_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&fsl_soc_platform);
+}
+module_init(fsl_soc_platform_init);
+
+static void __exit fsl_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&fsl_soc_platform);
+}
+module_exit(fsl_soc_platform_exit);
+
 MODULE_AUTHOR("Timur Tabi <timur@freescale.com>");
 MODULE_DESCRIPTION("Freescale Elo DMA ASoC PCM module");
 MODULE_LICENSE("GPL");
index 9ad8f9a2d8e90fba88875b169f33078bc7e20755..9eb1ce185bd0cbd11e0e3e8744499ff7085fa624 100644 (file)
@@ -828,6 +828,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
        if (rc)
                dev_info(psc_i2s->dev, "error creating sysfs files\n");
 
+       snd_soc_register_platform(&psc_i2s_pcm_soc_platform);
+
        /* Tell the ASoC OF helpers about it */
        of_snd_soc_register_platform(&psc_i2s_pcm_soc_platform, op->node,
                                     &psc_i2s->dai);
@@ -841,6 +843,8 @@ static int __devexit psc_i2s_of_remove(struct of_device *op)
 
        dev_dbg(&op->dev, "psc_i2s_remove()\n");
 
+       snd_soc_unregister_platform(&psc_i2s_pcm_soc_platform);
+
        bcom_gen_bd_rx_release(psc_i2s->capture.bcom_task);
        bcom_gen_bd_tx_release(psc_i2s->playback.bcom_task);
 
index e9084fdd2082efcbc14695e801ec6ad89ff66599..9940de296316a7576b1a3a5e824a12a9356fe3e1 100644 (file)
@@ -354,6 +354,18 @@ struct snd_soc_platform omap_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(omap_soc_platform);
 
+static int __devinit omap_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&omap_soc_platform);
+}
+module_init(omap_soc_platform_init);
+
+static void __exit omap_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&omap_soc_platform);
+}
+module_exit(omap_soc_platform_exit);
+
 MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>");
 MODULE_DESCRIPTION("OMAP PCM DMA module");
 MODULE_LICENSE("GPL");
index 0f6b7bb2d44b928b5be5639590c7b1434439d59a..4fa1578f5d474cc43512398b281e5ce070fb56ee 100644 (file)
@@ -118,6 +118,18 @@ struct snd_soc_platform pxa2xx_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(pxa2xx_soc_platform);
 
+static int __devinit pxa2xx_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&pxa2xx_soc_platform);
+}
+module_init(pxa2xx_soc_platform_init);
+
+static void __exit pxa2xx_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&pxa2xx_soc_platform);
+}
+module_exit(pxa2xx_soc_platform_exit);
+
 MODULE_AUTHOR("Nicolas Pitre");
 MODULE_DESCRIPTION("Intel PXA2xx PCM DMA module");
 MODULE_LICENSE("GPL");
index e13e614bada9aca7beeaecd85b8eb3f14f92a2a8..ea5a9caec13eefd55d313bdb0c6c2f2c92271c99 100644 (file)
@@ -465,6 +465,18 @@ struct snd_soc_platform s3c24xx_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(s3c24xx_soc_platform);
 
+static int __devinit s3c24xx_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&s3c24xx_soc_platform);
+}
+module_init(s3c24xx_soc_platform_init);
+
+static void __exit s3c24xx_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&s3c24xx_soc_platform);
+}
+module_exit(s3c24xx_soc_platform_exit);
+
 MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("Samsung S3C24XX PCM DMA module");
 MODULE_LICENSE("GPL");
index 9faa12622d09c07895c48cdf5d96ff6cfd47e38e..39ffca0933a254424110ce546160e8cf5eb45e4c 100644 (file)
@@ -348,6 +348,18 @@ struct snd_soc_platform sh7760_soc_platform = {
 };
 EXPORT_SYMBOL_GPL(sh7760_soc_platform);
 
+static int __devinit sh7760_soc_platform_init(void)
+{
+       return snd_soc_register_platform(&sh7760_soc_platform);
+}
+module_init(sh7760_soc_platform_init);
+
+static void __exit sh7760_soc_platform_exit(void)
+{
+       snd_soc_unregister_platform(&sh7760_soc_platform);
+}
+module_exit(sh7760_soc_platform_exit);
+
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("SH7760 Audio DMA (DMABRG) driver");
 MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>");