Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Just a couple of build regression fixes for ASoC fsl stuff. It
doesn't look too trivial, but neither intrusive, so hopefully I can
avoid your curse..."

Hey, Takashi has a good track record, I think he gets a pass..

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: fsl: fix snd-soc-imx-pcm module build
Revert "ASoC: fsl: fix multiple definition of init_module"

+63 -47
+7 -2
sound/soc/fsl/Kconfig
··· 108 config SND_SOC_IMX_SSI 109 tristate 110 111 - config SND_SOC_IMX_PCM_FIQ 112 tristate 113 select FIQ 114 115 config SND_SOC_IMX_PCM_DMA 116 - tristate 117 select SND_SOC_DMAENGINE_PCM 118 119 config SND_SOC_IMX_AUDMUX 120 tristate
··· 108 config SND_SOC_IMX_SSI 109 tristate 110 111 + config SND_SOC_IMX_PCM 112 tristate 113 + 114 + config SND_SOC_IMX_PCM_FIQ 115 + bool 116 select FIQ 117 + select SND_SOC_IMX_PCM 118 119 config SND_SOC_IMX_PCM_DMA 120 + bool 121 select SND_SOC_DMAENGINE_PCM 122 + select SND_SOC_IMX_PCM 123 124 config SND_SOC_IMX_AUDMUX 125 tristate
+1 -4
sound/soc/fsl/Makefile
··· 41 obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o 42 obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o 43 44 - obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o 45 - snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o 46 - obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o 47 - snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o 48 49 # i.MX Machine Support 50 snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
··· 41 obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o 42 obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o 43 44 + obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o 45 46 # i.MX Machine Support 47 snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
+1 -20
sound/soc/fsl/imx-pcm-dma.c
··· 154 .pcm_free = imx_pcm_free, 155 }; 156 157 - static int imx_soc_platform_probe(struct platform_device *pdev) 158 { 159 return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); 160 } 161 - 162 - static int imx_soc_platform_remove(struct platform_device *pdev) 163 - { 164 - snd_soc_unregister_platform(&pdev->dev); 165 - return 0; 166 - } 167 - 168 - static struct platform_driver imx_pcm_driver = { 169 - .driver = { 170 - .name = "imx-pcm-audio", 171 - .owner = THIS_MODULE, 172 - }, 173 - .probe = imx_soc_platform_probe, 174 - .remove = imx_soc_platform_remove, 175 - }; 176 - 177 - module_platform_driver(imx_pcm_driver); 178 - MODULE_LICENSE("GPL"); 179 - MODULE_ALIAS("platform:imx-pcm-audio");
··· 154 .pcm_free = imx_pcm_free, 155 }; 156 157 + int imx_pcm_dma_init(struct platform_device *pdev) 158 { 159 return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2); 160 }
+1 -21
sound/soc/fsl/imx-pcm-fiq.c
··· 281 .pcm_free = imx_pcm_fiq_free, 282 }; 283 284 - static int imx_soc_platform_probe(struct platform_device *pdev) 285 { 286 struct imx_ssi *ssi = platform_get_drvdata(pdev); 287 int ret; ··· 314 315 return ret; 316 } 317 - 318 - static int imx_soc_platform_remove(struct platform_device *pdev) 319 - { 320 - snd_soc_unregister_platform(&pdev->dev); 321 - return 0; 322 - } 323 - 324 - static struct platform_driver imx_pcm_driver = { 325 - .driver = { 326 - .name = "imx-fiq-pcm-audio", 327 - .owner = THIS_MODULE, 328 - }, 329 - 330 - .probe = imx_soc_platform_probe, 331 - .remove = imx_soc_platform_remove, 332 - }; 333 - 334 - module_platform_driver(imx_pcm_driver); 335 - 336 - MODULE_LICENSE("GPL");
··· 281 .pcm_free = imx_pcm_fiq_free, 282 }; 283 284 + int imx_pcm_fiq_init(struct platform_device *pdev) 285 { 286 struct imx_ssi *ssi = platform_get_drvdata(pdev); 287 int ret; ··· 314 315 return ret; 316 }
+35
sound/soc/fsl/imx-pcm.c
··· 31 runtime->dma_bytes); 32 return ret; 33 } 34 35 static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) 36 { ··· 80 out: 81 return ret; 82 } 83 84 void imx_pcm_free(struct snd_pcm *pcm) 85 { ··· 102 buf->area = NULL; 103 } 104 } 105 106 MODULE_DESCRIPTION("Freescale i.MX PCM driver"); 107 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
··· 31 runtime->dma_bytes); 32 return ret; 33 } 34 + EXPORT_SYMBOL_GPL(snd_imx_pcm_mmap); 35 36 static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) 37 { ··· 79 out: 80 return ret; 81 } 82 + EXPORT_SYMBOL_GPL(imx_pcm_new); 83 84 void imx_pcm_free(struct snd_pcm *pcm) 85 { ··· 100 buf->area = NULL; 101 } 102 } 103 + EXPORT_SYMBOL_GPL(imx_pcm_free); 104 + 105 + static int imx_pcm_probe(struct platform_device *pdev) 106 + { 107 + if (strcmp(pdev->id_entry->name, "imx-fiq-pcm-audio") == 0) 108 + return imx_pcm_fiq_init(pdev); 109 + 110 + return imx_pcm_dma_init(pdev); 111 + } 112 + 113 + static int imx_pcm_remove(struct platform_device *pdev) 114 + { 115 + snd_soc_unregister_platform(&pdev->dev); 116 + return 0; 117 + } 118 + 119 + static struct platform_device_id imx_pcm_devtype[] = { 120 + { .name = "imx-pcm-audio", }, 121 + { .name = "imx-fiq-pcm-audio", }, 122 + { /* sentinel */ } 123 + }; 124 + MODULE_DEVICE_TABLE(platform, imx_pcm_devtype); 125 + 126 + static struct platform_driver imx_pcm_driver = { 127 + .driver = { 128 + .name = "imx-pcm", 129 + .owner = THIS_MODULE, 130 + }, 131 + .id_table = imx_pcm_devtype, 132 + .probe = imx_pcm_probe, 133 + .remove = imx_pcm_remove, 134 + }; 135 + module_platform_driver(imx_pcm_driver); 136 137 MODULE_DESCRIPTION("Freescale i.MX PCM driver"); 138 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
+18
sound/soc/fsl/imx-pcm.h
··· 30 int imx_pcm_new(struct snd_soc_pcm_runtime *rtd); 31 void imx_pcm_free(struct snd_pcm *pcm); 32 33 #endif /* _IMX_PCM_H */
··· 30 int imx_pcm_new(struct snd_soc_pcm_runtime *rtd); 31 void imx_pcm_free(struct snd_pcm *pcm); 32 33 + #ifdef CONFIG_SND_SOC_IMX_PCM_DMA 34 + int imx_pcm_dma_init(struct platform_device *pdev); 35 + #else 36 + static inline int imx_pcm_dma_init(struct platform_device *pdev) 37 + { 38 + return -ENODEV; 39 + } 40 + #endif 41 + 42 + #ifdef CONFIG_SND_SOC_IMX_PCM_FIQ 43 + int imx_pcm_fiq_init(struct platform_device *pdev); 44 + #else 45 + static inline int imx_pcm_fiq_init(struct platform_device *pdev) 46 + { 47 + return -ENODEV; 48 + } 49 + #endif 50 + 51 #endif /* _IMX_PCM_H */