ARM: dma-mapping: factor dma_free_coherent() common code
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Nov 2009 16:31:39 +0000 (16:31 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 24 Nov 2009 17:41:35 +0000 (17:41 +0000)
commit695ae0af5a52df09dffcc2ce2d625d56ef36ce14
treec2114e79fac53f9eb29e0ed74b5aa4fa5a39b607
parent04da56943b416dd9fe7058abf8d5b9153164b3e9
ARM: dma-mapping: factor dma_free_coherent() common code

We effectively have three implementations of dma_free_coherent() mixed up
in the code; the incoherent MMU, coherent MMU and noMMU versions.

The coherent MMU and noMMU versions are actually functionally identical.
The incoherent MMU version is almost the same, but with the additional
step of unmapping the secondary mapping.

Separate out this additional step into __dma_free_remap() and simplify
the resulting dma_free_coherent() code.

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