mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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]>
This commit is contained in:
parent
ad1122e545
commit
16052827d9
28 changed files with 67 additions and 60 deletions
|
|
@ -146,7 +146,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
|
|||
dws->tx_sgl.dma_address = dws->tx_dma;
|
||||
dws->tx_sgl.length = dws->len;
|
||||
|
||||
txdesc = txchan->device->device_prep_slave_sg(txchan,
|
||||
txdesc = dmaengine_prep_slave_sg(txchan,
|
||||
&dws->tx_sgl,
|
||||
1,
|
||||
DMA_MEM_TO_DEV,
|
||||
|
|
@ -169,7 +169,7 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, int cs_change)
|
|||
dws->rx_sgl.dma_address = dws->rx_dma;
|
||||
dws->rx_sgl.length = dws->len;
|
||||
|
||||
rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
|
||||
rxdesc = dmaengine_prep_slave_sg(rxchan,
|
||||
&dws->rx_sgl,
|
||||
1,
|
||||
DMA_DEV_TO_MEM,
|
||||
|
|
|
|||
|
|
@ -633,8 +633,8 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_data_direction dir)
|
|||
if (!nents)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
txd = chan->device->device_prep_slave_sg(chan, sgt->sgl, nents,
|
||||
slave_dirn, DMA_CTRL_ACK);
|
||||
txd = dmaengine_prep_slave_sg(chan, sgt->sgl, nents,
|
||||
slave_dirn, DMA_CTRL_ACK);
|
||||
if (!txd) {
|
||||
dma_unmap_sg(chan->device->dev, sgt->sgl, sgt->nents, dir);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
|
|
@ -1040,7 +1040,7 @@ static int configure_dma(struct pl022 *pl022)
|
|||
goto err_tx_sgmap;
|
||||
|
||||
/* Send both scatterlists */
|
||||
rxdesc = rxchan->device->device_prep_slave_sg(rxchan,
|
||||
rxdesc = dmaengine_prep_slave_sg(rxchan,
|
||||
pl022->sgt_rx.sgl,
|
||||
rx_sglen,
|
||||
DMA_DEV_TO_MEM,
|
||||
|
|
@ -1048,7 +1048,7 @@ static int configure_dma(struct pl022 *pl022)
|
|||
if (!rxdesc)
|
||||
goto err_rxdesc;
|
||||
|
||||
txdesc = txchan->device->device_prep_slave_sg(txchan,
|
||||
txdesc = dmaengine_prep_slave_sg(txchan,
|
||||
pl022->sgt_tx.sgl,
|
||||
tx_sglen,
|
||||
DMA_MEM_TO_DEV,
|
||||
|
|
|
|||
|
|
@ -1078,7 +1078,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
|
|||
sg_dma_address(sg) = dma->rx_buf_dma + sg->offset;
|
||||
}
|
||||
sg = dma->sg_rx_p;
|
||||
desc_rx = dma->chan_rx->device->device_prep_slave_sg(dma->chan_rx, sg,
|
||||
desc_rx = dmaengine_prep_slave_sg(dma->chan_rx, sg,
|
||||
num, DMA_DEV_TO_MEM,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
if (!desc_rx) {
|
||||
|
|
@ -1123,7 +1123,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
|
|||
sg_dma_address(sg) = dma->tx_buf_dma + sg->offset;
|
||||
}
|
||||
sg = dma->sg_tx_p;
|
||||
desc_tx = dma->chan_tx->device->device_prep_slave_sg(dma->chan_tx,
|
||||
desc_tx = dmaengine_prep_slave_sg(dma->chan_tx,
|
||||
sg, num, DMA_MEM_TO_DEV,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
if (!desc_tx) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue