diff mbox

[01/12] pata_arasan_cf: use dmaengine_terminate_all() API

Message ID 1413042040-28222-1-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul Oct. 11, 2014, 3:40 p.m. UTC
The drivers should use dmaengine_terminate_all() API instead of accessing
the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/ata/pata_arasan_cf.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Comments

Viresh Kumar Oct. 13, 2014, 2:47 a.m. UTC | #1
On Sat, Oct 11, 2014 at 9:10 PM, Vinod Koul <vinod.koul@intel.com> wrote:
> The drivers should use dmaengine_terminate_all() API instead of accessing
> the device_control which will be deprecated soon
>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/ata/pata_arasan_cf.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
> index 4edb1a8..38216b9 100644
> --- a/drivers/ata/pata_arasan_cf.c
> +++ b/drivers/ata/pata_arasan_cf.c
> @@ -420,7 +420,7 @@ dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)
>
>         /* Wait for DMA to complete */
>         if (!wait_for_completion_timeout(&acdev->dma_completion, TIMEOUT)) {
> -               chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
> +               dmaengine_terminate_all(chan);
>                 dev_err(acdev->host->dev, "wait_for_completion_timeout\n");
>                 return -ETIMEDOUT;
>         }
> @@ -928,8 +928,7 @@ static int arasan_cf_suspend(struct device *dev)
>         struct arasan_cf_dev *acdev = host->ports[0]->private_data;
>
>         if (acdev->dma_chan)
> -               acdev->dma_chan->device->device_control(acdev->dma_chan,
> -                               DMA_TERMINATE_ALL, 0);
> +               dmaengine_terminate_all(acdev->dma_chan);
>
>         cf_exit(acdev);
>         return ata_host_suspend(host, PMSG_SUSPEND);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 4edb1a8..38216b9 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -420,7 +420,7 @@  dma_xfer(struct arasan_cf_dev *acdev, dma_addr_t src, dma_addr_t dest, u32 len)
 
 	/* Wait for DMA to complete */
 	if (!wait_for_completion_timeout(&acdev->dma_completion, TIMEOUT)) {
-		chan->device->device_control(chan, DMA_TERMINATE_ALL, 0);
+		dmaengine_terminate_all(chan);
 		dev_err(acdev->host->dev, "wait_for_completion_timeout\n");
 		return -ETIMEDOUT;
 	}
@@ -928,8 +928,7 @@  static int arasan_cf_suspend(struct device *dev)
 	struct arasan_cf_dev *acdev = host->ports[0]->private_data;
 
 	if (acdev->dma_chan)
-		acdev->dma_chan->device->device_control(acdev->dma_chan,
-				DMA_TERMINATE_ALL, 0);
+		dmaengine_terminate_all(acdev->dma_chan);
 
 	cf_exit(acdev);
 	return ata_host_suspend(host, PMSG_SUSPEND);