ARM: dma-mapping: clean up coherent arch dma allocation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Nov 2009 20:58:31 +0000 (20:58 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 24 Nov 2009 17:41:35 +0000 (17:41 +0000)
commitebd7a845fa4332da3ebcbe8cf1b09bb43413420e
tree07bb3b78fd2bbe3705fb040f6ad1f5da6b5a625c
parent88c58f3b92bc7c26439802c300d39b6377739d81
ARM: dma-mapping: clean up coherent arch dma allocation

IXP23xx added support for dma_alloc_coherent() for DMA arches with an
exception in dma_alloc_coherent().  This is a subset of what goes on
in __dma_alloc(), and there is no reason why dma_alloc_writecombine()
should not be given the same treatment (except, maybe, that IXP23xx
doesn't use it.)

We can better deal with this by moving the arch_is_coherent() test
inside __dma_alloc() and killing the code duplication.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Ungerer <gerg@uclinux.org>
arch/arm/mm/dma-mapping.c