X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fsoc%2Fjz4740%2Fjz4740-pcm.c;h=9b8cf256847d1ef8ace03ee8b0a94a1735a03eae;hb=96e80a7851b44f3decaac0625665cd64e550b71d;hp=d1989cde9f14d0d442531066f96b2a6e9c4f3525;hpb=d4bbf7e7759afc172e2bfbc5c416324590049cdd;p=karo-tx-linux.git diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c index d1989cde9f14..9b8cf256847d 100644 --- a/sound/soc/jz4740/jz4740-pcm.c +++ b/sound/soc/jz4740/jz4740-pcm.c @@ -302,7 +302,6 @@ static u64 jz4740_pcm_dmamask = DMA_BIT_MASK(32); static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) { struct snd_card *card = rtd->card->snd_card; - struct snd_soc_dai *dai = rtd->cpu_dai; struct snd_pcm *pcm = rtd->pcm; int ret = 0; @@ -312,14 +311,14 @@ static int jz4740_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!card->dev->coherent_dma_mask) card->dev->coherent_dma_mask = DMA_BIT_MASK(32); - if (dai->driver->playback.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { ret = jz4740_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); if (ret) goto err; } - if (dai->driver->capture.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { ret = jz4740_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_CAPTURE); if (ret) @@ -356,17 +355,7 @@ static struct platform_driver jz4740_pcm_driver = { }, }; -static int __init jz4740_soc_platform_init(void) -{ - return platform_driver_register(&jz4740_pcm_driver); -} -module_init(jz4740_soc_platform_init); - -static void __exit jz4740_soc_platform_exit(void) -{ - return platform_driver_unregister(&jz4740_pcm_driver); -} -module_exit(jz4740_soc_platform_exit); +module_platform_driver(jz4740_pcm_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_DESCRIPTION("Ingenic SoC JZ4740 PCM driver");