diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-07-10 10:05:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-07-10 10:05:58 -0400 |
commit | 85dc0f8554fa024b02eb50dcca71fa9881a45ea5 (patch) | |
tree | 4e6221b1e9c59395a093f320f2cf2f2022efd122 /sound/core | |
parent | abe594c2cf55b46d4feb61c01fe9063afff2e50c (diff) |
ALSA: pcm: Simplify check for dma_mmap_coherent() availability
We check the availability of dma_mmap_coherent() in hw_support_mmap()
but with an ugly ifdef of lots of arch-checks. Now we have a nice
CONFIG_ARCH_NO_COHERENT_DMA_MMAP kconfig, and this can be used
together with CONFIG_HAS_DMA check for a cleaner and more
comprehensive check.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index b26c7e61d600..2a730f38e375 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -238,10 +238,8 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream) | |||
238 | { | 238 | { |
239 | if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP)) | 239 | if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP)) |
240 | return false; | 240 | return false; |
241 | /* check architectures that return -EINVAL from dma_mmap_coherent() */ | 241 | /* architecture supports dma_mmap_coherent()? */ |
242 | /* FIXME: this should be some global flag */ | 242 | #if defined(CONFIG_ARCH_NO_COHERENT_DMA_MMAP) || !defined(CONFIG_HAS_DMA) |
243 | #if defined(CONFIG_C6X) || defined(CONFIG_FRV) || defined(CONFIG_MN10300) ||\ | ||
244 | defined(CONFIG_PARISC) || defined(CONFIG_XTENSA) | ||
245 | if (!substream->ops->mmap && | 243 | if (!substream->ops->mmap && |
246 | substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) | 244 | substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV) |
247 | return false; | 245 | return false; |