spi: rspi: Merge rspi_*_dma() into rspi_dma_transfer()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 2 Jun 2014 13:38:15 +0000 (15:38 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 2 Jun 2014 14:49:35 +0000 (15:49 +0100)
commitc52fb6d63425248bd4152451a2cc74b7df8fa989
tree369084deb2c83d773f84b6a320186094244e5b56
parente4b52dc4625ee739195189d40c6ddc7d55ddf312
spi: rspi: Merge rspi_*_dma() into rspi_dma_transfer()

rspi_send_dma() and rspi_send_receive_dma() are very similar. Consolidate
into a single function rspi_dma_transfer(), and add missing checks for
dmaengine_submit() failures.

Both sg_table pointer parameters can be NULL, as RSPI supports TX-only
mode, and unidirectional DMA transfers will also be needed later for
Dual/Quad DMA support.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-rspi.c