Skip to content

Commit a9eb124

Browse files
Alexandre BounineRohan Somvanshi
Alexandre Bounine
authored and
Rohan Somvanshi
committed
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: Alexandre Bounine <[email protected]> Signed-off-by: Vinod Koul <[email protected]> cherry-picked from mainline commit 1605282 Change-Id: I929a49556539621a0546829e88b3caa498c94be2 Signed-off-by: Laxman Dewangan <[email protected]> Reviewed-on: http://git-master/r/94463
1 parent 49c0369 commit a9eb124

File tree

24 files changed

+126
-42
lines changed

24 files changed

+126
-42
lines changed

arch/arm/plat-nomadik/include/plat/ste_dma40.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
195195
sg.dma_address = addr;
196196
sg.length = size;
197197

198-
return chan->device->device_prep_slave_sg(chan, &sg, 1,
199-
direction, flags);
198+
return dmaengine_prep_slave_sg(chan, &sg, 1, direction, flags);
200199
}
201200

202201
#else

drivers/media/video/mx3_camera.c

+32
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,38 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
292292
dma_cookie_t cookie;
293293
u32 fourcc = icd->current_fmt->host_fmt->fourcc;
294294
unsigned long flags;
295+
size_t new_size;
296+
297+
BUG_ON(bytes_per_line <= 0);
298+
299+
new_size = bytes_per_line * icd->user_height;
300+
301+
if (vb2_plane_size(vb, 0) < new_size) {
302+
dev_err(icd->parent, "Buffer #%d too small (%lu < %zu)\n",
303+
vb->v4l2_buf.index, vb2_plane_size(vb, 0), new_size);
304+
goto error;
305+
}
306+
307+
if (buf->state == CSI_BUF_NEEDS_INIT) {
308+
sg_dma_address(sg) = vb2_dma_contig_plane_dma_addr(vb, 0);
309+
sg_dma_len(sg) = new_size;
310+
311+
txd = dmaengine_prep_slave_sg(
312+
&ichan->dma_chan, sg, 1, DMA_DEV_TO_MEM,
313+
DMA_PREP_INTERRUPT);
314+
if (!txd)
315+
goto error;
316+
317+
txd->callback_param = txd;
318+
txd->callback = mx3_cam_dma_done;
319+
320+
buf->state = CSI_BUF_PREPARED;
321+
buf->txd = txd;
322+
} else {
323+
txd = buf->txd;
324+
}
325+
326+
vb2_set_plane_payload(vb, 0, new_size);
295327

296328
/* This is the configuration of one sg-element */
297329
video->out_pixel_fmt = fourcc_to_ipu_pix(fourcc);

drivers/media/video/timblogiw.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,8 @@ static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
563563

564564
spin_unlock_irq(&fh->queue_lock);
565565

566-
desc = fh->chan->device->device_prep_slave_sg(fh->chan,
567-
buf->sg, sg_elems, DMA_FROM_DEVICE,
566+
desc = dmaengine_prep_slave_sg(fh->chan,
567+
buf->sg, sg_elems, DMA_DEV_TO_MEM,
568568
DMA_PREP_INTERRUPT | DMA_COMPL_SKIP_SRC_UNMAP);
569569
if (!desc) {
570570
spin_lock_irq(&fh->queue_lock);

drivers/mmc/host/atmel-mci.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,9 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)
689689
sglen = dma_map_sg(chan->device->dev, data->sg,
690690
data->sg_len, direction);
691691

692-
desc = chan->device->device_prep_slave_sg(chan,
693-
data->sg, sglen, direction,
692+
dmaengine_slave_config(chan, &host->dma_conf);
693+
desc = dmaengine_prep_slave_sg(chan,
694+
data->sg, sglen, slave_dirn,
694695
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
695696
if (!desc)
696697
goto unmap_exit;

drivers/mmc/host/mmci.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static int mmci_dma_prep_data(struct mmci_host *host, struct mmc_data *data,
406406
return -EINVAL;
407407

408408
dmaengine_slave_config(chan, &conf);
409-
desc = device->device_prep_slave_sg(chan, data->sg, nr_sg,
409+
desc = dmaengine_prep_slave_sg(chan, data->sg, nr_sg,
410410
conf.direction, DMA_CTRL_ACK);
411411
if (!desc)
412412
goto unmap_exit;

drivers/mmc/host/mxcmmc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ static int mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data)
249249
if (nents != data->sg_len)
250250
return -EINVAL;
251251

252-
host->desc = host->dma->device->device_prep_slave_sg(host->dma,
253-
data->sg, data->sg_len, host->dma_dir,
252+
host->desc = dmaengine_prep_slave_sg(host->dma,
253+
data->sg, data->sg_len, slave_dirn,
254254
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
255255

256256
if (!host->desc) {

drivers/mmc/host/mxs-mmc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ static struct dma_async_tx_descriptor *mxs_mmc_prep_dma(
322322
sg_len = SSP_PIO_NUM;
323323
}
324324

325-
desc = host->dmach->device->device_prep_slave_sg(host->dmach,
326-
sgl, sg_len, host->dma_dir, append);
325+
desc = dmaengine_prep_slave_sg(host->dmach,
326+
sgl, sg_len, host->slave_dirn, append);
327327
if (desc) {
328328
desc->callback = mxs_mmc_dma_irq_callback;
329329
desc->callback_param = host;

drivers/mmc/host/sh_mmcif.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ static void sh_mmcif_start_dma_rx(struct sh_mmcif_host *host)
229229
DMA_FROM_DEVICE);
230230
if (ret > 0) {
231231
host->dma_active = true;
232-
desc = chan->device->device_prep_slave_sg(chan, sg, ret,
233-
DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
232+
desc = dmaengine_prep_slave_sg(chan, sg, ret,
233+
DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
234234
}
235235

236236
if (desc) {
@@ -277,8 +277,13 @@ static void sh_mmcif_start_dma_tx(struct sh_mmcif_host *host)
277277
DMA_TO_DEVICE);
278278
if (ret > 0) {
279279
host->dma_active = true;
280+
<<<<<<< HEAD
280281
desc = chan->device->device_prep_slave_sg(chan, sg, ret,
281282
DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
283+
=======
284+
desc = dmaengine_prep_slave_sg(chan, sg, ret,
285+
DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
286+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
282287
}
283288

284289
if (desc) {

drivers/mmc/host/tmio_mmc_dma.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
7676

7777
ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE);
7878
if (ret > 0)
79-
desc = chan->device->device_prep_slave_sg(chan, sg, ret,
80-
DMA_FROM_DEVICE, DMA_CTRL_ACK);
79+
desc = dmaengine_prep_slave_sg(chan, sg, ret,
80+
DMA_DEV_TO_MEM, DMA_CTRL_ACK);
8181

8282
if (desc) {
8383
cookie = dmaengine_submit(desc);
@@ -157,8 +157,13 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
157157

158158
ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE);
159159
if (ret > 0)
160+
<<<<<<< HEAD
160161
desc = chan->device->device_prep_slave_sg(chan, sg, ret,
161162
DMA_TO_DEVICE, DMA_CTRL_ACK);
163+
=======
164+
desc = dmaengine_prep_slave_sg(chan, sg, ret,
165+
DMA_MEM_TO_DEV, DMA_CTRL_ACK);
166+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
162167

163168
if (desc) {
164169
cookie = dmaengine_submit(desc);

drivers/spi/spi-dw-mid.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
144144
dws->tx_sgl.dma_address = dws->tx_dma;
145145
dws->tx_sgl.length = dws->len;
146146

147-
txdesc = txchan->device->device_prep_slave_sg(txchan,
147+
txdesc = dmaengine_prep_slave_sg(txchan,
148148
&dws->tx_sgl,
149149
1,
150150
DMA_TO_DEVICE,
@@ -166,7 +166,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
166166
dws->rx_sgl.dma_address = dws->rx_dma;
167167
dws->rx_sgl.length = dws->len;
168168

169-
rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
169+
rxdesc = dmaengine_prep_slave_sg(rxchan,
170170
&dws->rx_sgl,
171171
1,
172172
DMA_FROM_DEVICE,

drivers/spi/spi-ep93xx.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir)
629629
if (!nents)
630630
return ERR_PTR(-ENOMEM);
631631

632-
txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents,
633-
dir, DMA_CTRL_ACK);
632+
txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents,
633+
slave_dirn, DMA_CTRL_ACK);
634634
if (!txd) {
635635
dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
636636
return ERR_PTR(-ENOMEM);

drivers/spi/spi-pl022.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1048,15 +1048,15 @@ static int configure_dma(struct pl022 *pl022)
10481048
goto err_tx_sgmap;
10491049

10501050
/* Send both scatterlists */
1051-
rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
1051+
rxdesc = dmaengine_prep_slave_sg(rxchan,
10521052
pl022->sgt_rx.sgl,
10531053
rx_sglen,
10541054
DMA_FROM_DEVICE,
10551055
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
10561056
if (!rxdesc)
10571057
goto err_rxdesc;
10581058

1059-
txdesc = txchan->device->device_prep_slave_sg(txchan,
1059+
txdesc = dmaengine_prep_slave_sg(txchan,
10601060
pl022->sgt_tx.sgl,
10611061
tx_sglen,
10621062
DMA_TO_DEVICE,

drivers/spi/spi-topcliff-pch.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
10751075
sg_dma_address(sg) = dma->rx_buf_dma + sg->offset;
10761076
}
10771077
sg = dma->sg_rx_p;
1078-
desc_rx = dma->chan_rx->device->device_prep_slave_sg(dma->chan_rx, sg,
1079-
num, DMA_FROM_DEVICE,
1078+
desc_rx = dmaengine_prep_slave_sg(dma->chan_rx, sg,
1079+
num, DMA_DEV_TO_MEM,
10801080
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
10811081
if (!desc_rx) {
10821082
dev_err(&data->master->dev, "%s:device_prep_slave_sg Failed\n",
@@ -1120,8 +1120,13 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
11201120
sg_dma_address(sg) = dma->tx_buf_dma + sg->offset;
11211121
}
11221122
sg = dma->sg_tx_p;
1123+
<<<<<<< HEAD
11231124
desc_tx = dma->chan_tx->device->device_prep_slave_sg(dma->chan_tx,
11241125
sg, num, DMA_TO_DEVICE,
1126+
=======
1127+
desc_tx = dmaengine_prep_slave_sg(dma->chan_tx,
1128+
sg, num, DMA_MEM_TO_DEV,
1129+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
11251130
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
11261131
if (!desc_tx) {
11271132
dev_err(&data->master->dev, "%s:device_prep_slave_sg Failed\n",

drivers/tty/serial/amba-pl011.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static int pl011_dma_tx_refill(struct uart_amba_port *uap)
480480
return -EBUSY;
481481
}
482482

483-
desc = dma_dev->device_prep_slave_sg(chan, &dmatx->sg, 1, DMA_TO_DEVICE,
483+
desc = dmaengine_prep_slave_sg(chan, &dmatx->sg, 1, DMA_MEM_TO_DEV,
484484
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
485485
if (!desc) {
486486
dma_unmap_sg(dma_dev->dev, &dmatx->sg, 1, DMA_TO_DEVICE);
@@ -663,7 +663,6 @@ static void pl011_dma_rx_callback(void *data);
663663
static int pl011_dma_rx_trigger_dma(struct uart_amba_port *uap)
664664
{
665665
struct dma_chan *rxchan = uap->dmarx.chan;
666-
struct dma_device *dma_dev;
667666
struct pl011_dmarx_data *dmarx = &uap->dmarx;
668667
struct dma_async_tx_descriptor *desc;
669668
struct pl011_sgbuf *sgbuf;
@@ -674,9 +673,14 @@ static int pl011_dma_rx_trigger_dma(struct uart_amba_port *uap)
674673
/* Start the RX DMA job */
675674
sgbuf = uap->dmarx.use_buf_b ?
676675
&uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a;
676+
<<<<<<< HEAD
677677
dma_dev = rxchan->device;
678678
desc = rxchan->device->device_prep_slave_sg(rxchan, &sgbuf->sg, 1,
679679
DMA_FROM_DEVICE,
680+
=======
681+
desc = dmaengine_prep_slave_sg(rxchan, &sgbuf->sg, 1,
682+
DMA_DEV_TO_MEM,
683+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
680684
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
681685
/*
682686
* If the DMA engine is busy and cannot prepare a

drivers/tty/serial/pch_uart.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -751,8 +751,8 @@ static int dma_handle_rx(struct eg20t_port *priv)
751751

752752
sg_dma_address(sg) = priv->rx_buf_dma;
753753

754-
desc = priv->chan_rx->device->device_prep_slave_sg(priv->chan_rx,
755-
sg, 1, DMA_FROM_DEVICE,
754+
desc = dmaengine_prep_slave_sg(priv->chan_rx,
755+
sg, 1, DMA_DEV_TO_MEM,
756756
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
757757

758758
if (!desc)
@@ -910,8 +910,13 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
910910
sg_dma_len(sg) = size;
911911
}
912912

913+
<<<<<<< HEAD
913914
desc = priv->chan_tx->device->device_prep_slave_sg(priv->chan_tx,
914915
priv->sg_tx_p, nent, DMA_TO_DEVICE,
916+
=======
917+
desc = dmaengine_prep_slave_sg(priv->chan_tx,
918+
priv->sg_tx_p, nent, DMA_MEM_TO_DEV,
919+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
915920
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
916921
if (!desc) {
917922
dev_err(priv->port.dev, "%s:device_prep_slave_sg Failed\n",

drivers/tty/serial/sh-sci.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,8 @@ static void sci_submit_rx(struct sci_port *s)
12131213
struct scatterlist *sg = &s->sg_rx[i];
12141214
struct dma_async_tx_descriptor *desc;
12151215

1216-
desc = chan->device->device_prep_slave_sg(chan,
1217-
sg, 1, DMA_FROM_DEVICE, DMA_PREP_INTERRUPT);
1216+
desc = dmaengine_prep_slave_sg(chan,
1217+
sg, 1, DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT);
12181218

12191219
if (desc) {
12201220
s->desc_rx[i] = desc;
@@ -1328,8 +1328,13 @@ static void work_fn_tx(struct work_struct *work)
13281328

13291329
BUG_ON(!sg_dma_len(sg));
13301330

1331+
<<<<<<< HEAD
13311332
desc = chan->device->device_prep_slave_sg(chan,
13321333
sg, s->sg_len_tx, DMA_TO_DEVICE,
1334+
=======
1335+
desc = dmaengine_prep_slave_sg(chan,
1336+
sg, s->sg_len_tx, DMA_MEM_TO_DEV,
1337+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
13331338
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
13341339
if (!desc) {
13351340
/* switch to PIO */

drivers/usb/musb/ux500_dma.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
147147
dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG,
148148
(unsigned long) &slave_conf);
149149

150-
dma_desc = dma_chan->device->
151-
device_prep_slave_sg(dma_chan, &sg, 1, direction,
150+
dma_desc = dmaengine_prep_slave_sg(dma_chan, &sg, 1, direction,
152151
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
153152
if (!dma_desc)
154153
return false;

drivers/usb/renesas_usbhs/fifo.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,8 @@ static void usbhsf_dma_prepare_tasklet(unsigned long data)
602602
sg_dma_address(&sg) = pkt->dma + pkt->actual;
603603
sg_dma_len(&sg) = pkt->trans;
604604

605-
desc = chan->device->device_prep_slave_sg(chan, &sg, 1, dir,
606-
DMA_PREP_INTERRUPT |
607-
DMA_CTRL_ACK);
605+
desc = dmaengine_prep_slave_sg(chan, &sg, 1, dir,
606+
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
608607
if (!desc)
609608
return;
610609

drivers/video/mx3fb.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ static void sdc_enable_channel(struct mx3fb_info *mx3_fbi)
333333

334334
/* This enables the channel */
335335
if (mx3_fbi->cookie < 0) {
336-
mx3_fbi->txd = dma_chan->device->device_prep_slave_sg(dma_chan,
337-
&mx3_fbi->sg[0], 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
336+
mx3_fbi->txd = dmaengine_prep_slave_sg(dma_chan,
337+
&mx3_fbi->sg[0], 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
338338
if (!mx3_fbi->txd) {
339339
dev_err(mx3fb->dev, "Cannot allocate descriptor on %d\n",
340340
dma_chan->chan_id);
@@ -1103,8 +1103,13 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
11031103
if (mx3_fbi->txd)
11041104
async_tx_ack(mx3_fbi->txd);
11051105

1106+
<<<<<<< HEAD
11061107
txd = dma_chan->device->device_prep_slave_sg(dma_chan, sg +
11071108
mx3_fbi->cur_ipu_buf, 1, DMA_TO_DEVICE, DMA_PREP_INTERRUPT);
1109+
=======
1110+
txd = dmaengine_prep_slave_sg(dma_chan, sg +
1111+
mx3_fbi->cur_ipu_buf, 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
1112+
>>>>>>> 1605282... dmaengine/dma_slave: introduce inline wrappers
11081113
if (!txd) {
11091114
dev_err(fbi->device,
11101115
"Error preparing a DMA transaction descriptor.\n");

include/linux/dmaengine.h

+16
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,22 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
542542
return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
543543
}
544544

545+
static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
546+
struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len,
547+
enum dma_transfer_direction dir, unsigned long flags)
548+
{
549+
return chan->device->device_prep_slave_sg(chan, sgl, sg_len,
550+
dir, flags);
551+
}
552+
553+
static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
554+
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
555+
size_t period_len, enum dma_transfer_direction dir)
556+
{
557+
return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
558+
period_len, dir);
559+
}
560+
545561
static inline int dmaengine_terminate_all(struct dma_chan *chan)
546562
{
547563
return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);

sound/soc/ep93xx/ep93xx-pcm.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,10 @@ static int ep93xx_pcm_dma_submit(struct snd_pcm_substream *substream)
142142
struct snd_pcm_runtime *runtime = substream->runtime;
143143
struct ep93xx_runtime_data *rtd = runtime->private_data;
144144
struct dma_chan *chan = rtd->dma_chan;
145-
struct dma_device *dma_dev = chan->device;
146145
struct dma_async_tx_descriptor *desc;
147146

148147
rtd->pointer_bytes = 0;
149-
desc = dma_dev->device_prep_dma_cyclic(chan, runtime->dma_addr,
148+
desc = dmaengine_prep_dma_cyclic(chan, runtime->dma_addr,
150149
rtd->period_bytes * rtd->periods,
151150
rtd->period_bytes,
152151
rtd->dma_data.direction);

sound/soc/imx/imx-pcm-dma-mx2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream,
155155

156156
iprtd->buf = (unsigned int *)substream->dma_buffer.area;
157157

158-
iprtd->desc = chan->device->device_prep_dma_cyclic(chan, dma_addr,
158+
iprtd->desc = dmaengine_prep_dma_cyclic(chan, dma_addr,
159159
iprtd->period_bytes * iprtd->periods,
160160
iprtd->period_bytes,
161161
substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?

0 commit comments

Comments
 (0)