Skip to content

Commit

Permalink
carma-fpga: use dmaengine_xxx() API
Browse files Browse the repository at this point in the history
The drivers should use dmaengine_slave_config() and dmaengine_prep_dma_sg()
API instead of accessing the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Vinod Koul committed Oct 15, 2014
1 parent 0a5642b commit 4fdcf68
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/misc/carma/carma-fpga-program.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
config.direction = DMA_MEM_TO_DEV;
config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
config.dst_maxburst = fpga_fifo_size(priv->regs) / 2 / 4;
ret = chan->device->device_control(chan, DMA_SLAVE_CONFIG,
(unsigned long)&config);
ret = dmaengine_slave_config(chan, &config);
if (ret) {
dev_err(priv->dev, "DMA slave configuration failed\n");
goto out_dma_unmap;
Expand All @@ -532,9 +531,9 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
}

/* setup and submit the DMA transaction */
tx = chan->device->device_prep_dma_sg(chan,
table.sgl, num_pages,
vb->sglist, vb->sglen, 0);

tx = dmaengine_prep_dma_sg(chan, table.sgl, num_pages,
vb->sglist, vb->sglen, 0);
if (!tx) {
dev_err(priv->dev, "Unable to prep DMA transaction\n");
ret = -ENOMEM;
Expand Down

0 comments on commit 4fdcf68

Please sign in to comment.