Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1683829 > unrolled thread
| Started by | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| First post | 2017-07-09 21:40 +0200 |
| Last post | 2017-07-10 16:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA Geert Uytterhoeven <geert@linux-m68k.org> - 2017-07-09 21:40 +0200
Re: [PATCH] ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA Takashi Iwai <tiwai@suse.de> - 2017-07-10 16:10 +0200
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2017-07-09 21:40 +0200 |
| Subject | [PATCH] ALSA: pcm: Protect call to dma_mmap_coherent() by check for HAS_DMA |
| Message-ID | <u1qdI-3o7-15@gated-at.bofh.it> |
If NO_DMA=y:
sound/core/pcm_native.o: In function `snd_pcm_lib_default_mmap':
pcm_native.c:(.text+0x144c): undefined reference to `bad_dma_ops'
pcm_native.c:(.text+0x1474): undefined reference to `dma_common_mmap'
Add a check for HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
sound/core/pcm_native.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index b3d5bed750297ec2..e540a22aa3d8988a 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3502,7 +3502,7 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
- if (!substream->ops->page &&
+ if (IS_ENABLED(CONFIG_HAS_DMA) && !substream->ops->page &&
substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
return dma_mmap_coherent(substream->dma_buffer.dev.dev,
area,
--
2.7.4
[toc] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2017-07-10 16:10 +0200 |
| Message-ID | <u1HxU-61m-11@gated-at.bofh.it> |
| In reply to | #1683829 |
On Sun, 09 Jul 2017 21:31:02 +0200, Geert Uytterhoeven wrote: > > If NO_DMA=y: > > sound/core/pcm_native.o: In function `snd_pcm_lib_default_mmap': > pcm_native.c:(.text+0x144c): undefined reference to `bad_dma_ops' > pcm_native.c:(.text+0x1474): undefined reference to `dma_common_mmap' > > Add a check for HAS_DMA to fix this. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Applied, thanks. Takashi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web