From: Kuninori Morimoto Date: Wed, 25 Apr 2012 18:50:53 +0000 (+0200) Subject: dmaengine: Fixup dmaengine_prep_slave_single() to be actually useful X-Git-Tag: v3.5-rc1~80^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=922ee08baad2052d0759f100e026d49798c51fef;p=pandora-kernel.git dmaengine: Fixup dmaengine_prep_slave_single() to be actually useful dmaengine_prep_slave_single() is a helper function which is supposed to be used to prepare a transfer of a single contingous buffer. Currently the function takes a pointer to such a buffer from which it builds a scatterlist and passes it on to device_prep_slave_sg. The dmaengine framework requires that any scatterlist that is passed to device_prep_slave_sg is mapped and it may not be unmapped until the DMA operation has completed. This is not the here and any use of dmaengine_prep_slave_single() will lead to undefined behaviour (Most likely a system crash). This patch changes dmaengine_prep_slave_single() to take a dma_addr_t instead of a pointer to a buffer and moves the responsibility of mapping and unmapping the buffer up to the caller. Signed-off-by: Kuninori Morimoto Signed-off-by: Lars-Peter Clausen Acked-by: Linus Walleij Signed-off-by: Vinod Koul --- Reading git-diff-tree failed