Skip to content

Commit

Permalink
dmaengine: td: Rename device_control
Browse files Browse the repository at this point in the history
Rename the device_control callback of the Timberdal DMA driver to terminate_all
since it's all it's really doing. That will eventually be used to retrieve
slave capabilities.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
mripard authored and Vinod Koul committed Dec 22, 2014
1 parent c91781b commit 2c55536
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/dma/timb_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,18 +561,14 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan,
return &td_desc->txd;
}

static int td_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
unsigned long arg)
static int td_terminate_all(struct dma_chan *chan)
{
struct timb_dma_chan *td_chan =
container_of(chan, struct timb_dma_chan, chan);
struct timb_dma_desc *td_desc, *_td_desc;

dev_dbg(chan2dev(chan), "%s: Entry\n", __func__);

if (cmd != DMA_TERMINATE_ALL)
return -ENXIO;

/* first the easy part, put the queue into the free list */
spin_lock_bh(&td_chan->lock);
list_for_each_entry_safe(td_desc, _td_desc, &td_chan->queue,
Expand Down Expand Up @@ -697,7 +693,7 @@ static int td_probe(struct platform_device *pdev)
dma_cap_set(DMA_SLAVE, td->dma.cap_mask);
dma_cap_set(DMA_PRIVATE, td->dma.cap_mask);
td->dma.device_prep_slave_sg = td_prep_slave_sg;
td->dma.device_control = td_control;
td->dma.device_terminate_all = td_terminate_all;

td->dma.dev = &pdev->dev;

Expand Down

0 comments on commit 2c55536

Please sign in to comment.