]> git.ipfire.org Git - thirdparty/linux.git/commit
dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 16 Mar 2018 13:25:40 +0000 (14:25 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 16 Mar 2018 18:58:27 +0000 (19:58 +0100)
commitf29ab49b5388b2f829cf99859bc5f8ad8ec4d06a
treed8fb169b5d63e0ae56bd03bcc81c7a7fb041e1df
parent0c8efd610b58cb23cefdfa12015799079aef94ae
dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy

If NO_DMA=y, get_dma_ops() returns a reference to the
non-existing symbol bad_dma_ops, thus causing a link failure if it is
ever used.

Make get_dma_ops() return NULL instead, to avoid the link failure.
This allows to improve compile-testing, and limits the need to keep on
sprinkling dependencies on HAS_DMA all over the place.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/dma-mapping.h