Skip to contentSkip to conversation

ata: ep93xx: use dmaengine_prep_slave_sg api instead of internal callback

PATCH New Barry Song 2 participants 2 messages May 25, 2014 – May 27, 2014 libata

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH 1/1 ata: ep93xx: use dmaengine_prep_slave_sg api instead of internal callback

From: Barry Song <[email protected]>

it is better to use generic api instead of calling an internal callback like channel->device->device_prep_slave_sg().

---
 drivers/ata/pata_ep93xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_ep93xx.c +2 -2
index cad9d45..6ad5c07 100644
@@ -708,8 +708,8 @@ static void ep93xx_pata_dma_start(struct ata_queued_cmd *qc)
 	struct dma_chan *channel = qc->dma_dir == DMA_TO_DEVICE
 		? drv_data->dma_tx_channel : drv_data->dma_rx_channel;
 
-	txd = channel->device->device_prep_slave_sg(channel, qc->sg,
-		 qc->n_elem, qc->dma_dir, DMA_CTRL_ACK, NULL);
+	txd = dmaengine_prep_slave_sg(channel, qc->sg, qc->n_elem, qc->dma_dir,
+		DMA_CTRL_ACK);
 	if (!txd) {
 		dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n");
 		return;
Signature · 1 line
1.9.3
Applied
#1 lore raw

PATCH 1/1 ata: ep93xx: use dmaengine_prep_slave_sg api instead of internal callback

Quoted 6 lines · Barry Song

From: Barry Song <[email protected]>

it is better to use generic api instead of calling an internal callback like channel->device->device_prep_slave_sg().

Applied to libata/for-3.16.

Thanks.

Signature · 1 line
tejun