[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c305572c-7412-f4c5-1599-668983000c8c@samsung.com>
Date: Wed, 15 Jan 2020 14:04:08 +0100
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Peter Ujfalusi <peter.ujfalusi@...com>
Cc: vireshk@...nel.org, axboe@...nel.dk, vkoul@...nel.org,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ata: pata_arasan_cf: Use dma_request_chan() instead
dma_request_slave_channel()
On 1/13/20 3:27 PM, Peter Ujfalusi wrote:
> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
> eating up the error code.
>
> The dma_request_chan() is the standard API to request slave channel,
> clients should be moved away from the legacy API to allow us to retire
> them.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> Hi,
>
> Changes since v1:
> - Fixed type in subject
> - Removed reference to deferred probing in commit message
>
> Regards,
> Peter
>
> drivers/ata/pata_arasan_cf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
> index 391dff0f25a2..e9cf31f38450 100644
> --- a/drivers/ata/pata_arasan_cf.c
> +++ b/drivers/ata/pata_arasan_cf.c
> @@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work)
>
> /* request dma channels */
> /* dma_request_channel may sleep, so calling from process context */
> - acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data");
> - if (!acdev->dma_chan) {
> + acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
> + if (IS_ERR(acdev->dma_chan)) {
> dev_err(acdev->host->dev, "Unable to get dma_chan\n");
> + acdev->dma_chan = NULL;
> goto chan_request_fail;
> }
>
> @@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work)
> }
>
> dma_release_channel(acdev->dma_chan);
> + acdev->dma_chan = NULL;
>
> /* data xferred successfully */
> if (!ret) {
>
Powered by blists - more mailing lists