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

Commit 69493e0b authored by Barry Song's avatar Barry Song Committed by Tejun Heo
Browse files

ata: ep93xx: use dmaengine_prep_slave_sg api instead of internal callback



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

Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 754a292f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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
	struct dma_chan *channel = qc->dma_dir == DMA_TO_DEVICE
		? drv_data->dma_tx_channel : drv_data->dma_rx_channel;
		? drv_data->dma_tx_channel : drv_data->dma_rx_channel;


	txd = channel->device->device_prep_slave_sg(channel, qc->sg,
	txd = dmaengine_prep_slave_sg(channel, qc->sg, qc->n_elem, qc->dma_dir,
		 qc->n_elem, qc->dma_dir, DMA_CTRL_ACK, NULL);
		DMA_CTRL_ACK);
	if (!txd) {
	if (!txd) {
		dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n");
		dev_err(qc->ap->dev, "failed to prepare slave for sg dma\n");
		return;
		return;