[media] vb2-vmalloc: Protect DMA-specific code by #ifdef CONFIG_HAS_DMA
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 15 Dec 2014 13:40:28 +0000 (10:40 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 23 Dec 2014 18:28:09 +0000 (16:28 -0200)
commit99f3cd52aee21091ce62442285a68873e3be833f
tree80764a84e0c1bcdbad6681be5c8e52b0fa49dd6f
parent983c5bd26b86ba1c0d79b770e596bb8b77e42f32
[media] vb2-vmalloc: Protect DMA-specific code by #ifdef CONFIG_HAS_DMA

If NO_DMA=y:

drivers/built-in.o: In function `vb2_vmalloc_dmabuf_ops_detach':
videobuf2-vmalloc.c:(.text+0x6f11b0): undefined reference to `dma_unmap_sg'
drivers/built-in.o: In function `vb2_vmalloc_dmabuf_ops_map':
videobuf2-vmalloc.c:(.text+0x6f1266): undefined reference to `dma_unmap_sg'
videobuf2-vmalloc.c:(.text+0x6f1282): undefined reference to `dma_map_sg'

As we don't want to make the core VIDEOBUF2_VMALLOC depend on HAS_DMA
(it's v4l2 core code, and selected by a lot of drivers), stub out the
DMA support if HAS_DMA is not set.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-vmalloc.c