diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 |
commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
tree | daada742542518b02d7db7c5d32e715eaa5f166d /sound/soc/ep93xx/ep93xx-pcm.c | |
parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
download | blackbird-op-linux-4de3a8e101150feaefa1139611a50ff37467f33e.tar.gz blackbird-op-linux-4de3a8e101150feaefa1139611a50ff37467f33e.zip |
Merge branch 'master' into fixes
Diffstat (limited to 'sound/soc/ep93xx/ep93xx-pcm.c')
-rw-r--r-- | sound/soc/ep93xx/ep93xx-pcm.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sound/soc/ep93xx/ep93xx-pcm.c b/sound/soc/ep93xx/ep93xx-pcm.c index d00230a591b1..3fc96130d1a6 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"); |