spi/pl022: pass the returned sglen to the DMA engine
authorLinus Walleij <linus.walleij@stericsson.com>
Wed, 22 Dec 2010 22:13:37 +0000 (23:13 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 24 Dec 2010 04:06:46 +0000 (21:06 -0700)
commit082086f2ce53c69260396e977d29972128def1d7
treef06554960ae266151e300193608f543863318783
parentb729889686afb7d4366e07fe9c2f7a2737166462
spi/pl022: pass the returned sglen to the DMA engine

The sglen return by the dma_map_sg() should be passed to the DMA
engine, not the one passed in. If we one day have a DMA mapper
that can coalesce entries, this will bug due to a too large
number of entries being passed in.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/amba-pl022.c