X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sound%2Fsoc%2Fep93xx%2Fep93xx-pcm.c;h=de83904498730dbf43447cdcc4ef42cd34a9d0d7;hb=57f2685c16fa8e0cb86e4bc7c8ac33bfed943819;hp=23de7927810c2c675dc9ca43d0b28d4366c15014;hpb=e08b881a69d638175bfa99b5af4d72b731633ea7;p=~andy%2Flinux diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index 23de7927810..de839044987 100644 --- a/sound/soc/ep93xx/ep93xx-pcm.c +++ b/sound/soc/ep93xx/ep93xx-pcm.c @@ -286,7 +286,6 @@ static u64 ep93xx_pcm_dmamask = 0xffffffff; static int ep93xx_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; @@ -295,14 +294,14 @@ static int ep93xx_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!card->dev->coherent_dma_mask) card->dev->coherent_dma_mask = 0xffffffff; - if (dai->driver->playback.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { ret = ep93xx_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); if (ret) return ret; } - if (dai->driver->capture.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { ret = ep93xx_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_CAPTURE); if (ret) @@ -339,18 +338,7 @@ static struct platform_driver ep93xx_pcm_driver = { .remove = __devexit_p(ep93xx_soc_platform_remove), }; -static int __init ep93xx_soc_platform_init(void) -{ - return platform_driver_register(&ep93xx_pcm_driver); -} - -static void __exit ep93xx_soc_platform_exit(void) -{ - platform_driver_unregister(&ep93xx_pcm_driver); -} - -module_init(ep93xx_soc_platform_init); -module_exit(ep93xx_soc_platform_exit); +module_platform_driver(ep93xx_pcm_driver); MODULE_AUTHOR("Ryan Mallon"); MODULE_DESCRIPTION("EP93xx ALSA PCM interface");