summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Czerwinski <l.czerwinski@samsung.com>2013-09-02 18:23:29 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:44:32 +0900
commita1d32b7ac1e6fe85845f3f8c6899a6a077877423 (patch)
treefa9d0e2ced22757ba40f9fc02517f1de38e775eb
parent08ae79ab454b860235241247d2e831a9a92c75fe (diff)
downloadlinux-3.10-a1d32b7ac1e6fe85845f3f8c6899a6a077877423.tar.gz
linux-3.10-a1d32b7ac1e6fe85845f3f8c6899a6a077877423.tar.bz2
linux-3.10-a1d32b7ac1e6fe85845f3f8c6899a6a077877423.zip
spi: spi-s3c64xx: s3c64xx_prepare_dma() clean up
One element scatterlist initizalization is replaced by the hardcoded initization in the dmaengine_prep_slave_single() function. Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
-rw-r--r--drivers/spi/spi-s3c64xx.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 62199077d50..5eacae5a86c 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -374,17 +374,10 @@ static void s3c64xx_dma_deinit_param(struct s3c64xx_spi_driver_data *sdd,
static void s3c64xx_prepare_dma(struct s3c64xx_spi_dma_data *dma,
unsigned len, dma_addr_t buf)
{
- struct scatterlist sg;
struct dma_async_tx_descriptor *desc;
- sg_init_table(&sg, 1);
- sg_dma_len(&sg) = len;
- sg_set_page(&sg, pfn_to_page(PFN_DOWN(buf)),
- len, offset_in_page(buf));
- sg_dma_address(&sg) = buf;
-
- desc = dmaengine_prep_slave_sg(dma->ch,
- &sg, 1, dma->direction, DMA_PREP_INTERRUPT);
+ desc = dmaengine_prep_slave_single(dma->ch,
+ dma->dma_phys, len, dma->direction, DMA_PREP_INTERRUPT);
desc->callback = s3c64xx_spi_dmacb;
desc->callback_param = dma;