Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16052827 authored by Alexandre Bounine's avatar Alexandre Bounine Committed by Vinod Koul
Browse files

dmaengine/dma_slave: introduce inline wrappers

Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to hide new parameter from current users of affected interfaces.
Convert current users to use new wrappers instead of direct calls.
Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269

].

Signed-off-by: default avatarAlexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent ad1122e5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -200,8 +200,7 @@ dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
	sg.dma_address = addr;
	sg.length = size;

	return chan->device->device_prep_slave_sg(chan, &sg, 1,
						  direction, flags);
	return dmaengine_prep_slave_sg(chan, &sg, 1, direction, flags);
}

#else
+2 −2
Original line number Diff line number Diff line
@@ -79,11 +79,11 @@ static int samsung_dmadev_prepare(unsigned ch,
			    info->len, offset_in_page(info->buf));
		sg_dma_address(&sg) = info->buf;

		desc = chan->device->device_prep_slave_sg(chan,
		desc = dmaengine_prep_slave_sg(chan,
			&sg, 1, info->direction, DMA_PREP_INTERRUPT);
		break;
	case DMA_CYCLIC:
		desc = chan->device->device_prep_dma_cyclic(chan,
		desc = dmaengine_prep_dma_cyclic(chan,
			info->buf, info->len, info->period, info->direction);
		break;
	default:
+1 −1
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
		sg_dma_address(sg)	= vb2_dma_contig_plane_dma_addr(vb, 0);
		sg_dma_len(sg)		= new_size;

		txd = ichan->dma_chan.device->device_prep_slave_sg(
		txd = dmaengine_prep_slave_sg(
			&ichan->dma_chan, sg, 1, DMA_DEV_TO_MEM,
			DMA_PREP_INTERRUPT);
		if (!txd)
+1 −1
Original line number Diff line number Diff line
@@ -564,7 +564,7 @@ static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)

	spin_unlock_irq(&fh->queue_lock);

	desc = fh->chan->device->device_prep_slave_sg(fh->chan,
	desc = dmaengine_prep_slave_sg(fh->chan,
		buf->sg, sg_elems, DMA_DEV_TO_MEM,
		DMA_PREP_INTERRUPT | DMA_COMPL_SKIP_SRC_UNMAP);
	if (!desc) {
+1 −1
Original line number Diff line number Diff line
@@ -875,7 +875,7 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)
			data->sg_len, direction);

	dmaengine_slave_config(chan, &host->dma_conf);
	desc = chan->device->device_prep_slave_sg(chan,
	desc = dmaengine_prep_slave_sg(chan,
			data->sg, sglen, slave_dirn,
			DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
	if (!desc)
Loading