mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	<ulf.hansson@linaro.org>, <f.fainelli@gmail.com>,
	<rjui@broadcom.com>, <sbranden@broadcom.com>
Cc: <vkoul@kernel.org>, <linux-mmc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>,
	<linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
Date: Tue, 17 Dec 2019 14:15:46 +0200	[thread overview]
Message-ID: <1eecb651-cce7-b099-e2d2-65dcde357a71@ti.com> (raw)
In-Reply-To: <cd316378273d18b93b5dcad8b357821a708c7805.camel@suse.de>



On 17/12/2019 13.37, Nicolas Saenz Julienne wrote:
> Hi Peter,
> 
> On Tue, 2019-12-17 at 13:26 +0200, Peter Ujfalusi wrote:
>> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
>> eating up the error code.
>>
>> By using dma_request_chan() directly the driver can support deferred
>> probing against DMA.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> ---
>>  drivers/mmc/host/bcm2835.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
>> index 99f61fd2a658..3821f159d36d 100644
>> --- a/drivers/mmc/host/bcm2835.c
>> +++ b/drivers/mmc/host/bcm2835.c
>> @@ -1393,7 +1393,15 @@ static int bcm2835_probe(struct platform_device *pdev)
>>  	host->dma_chan = NULL;
>>  	host->dma_desc = NULL;
>>  
>> -	host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");
>> +	host->dma_chan_rxtx = dma_request_chan(dev, "rx-tx");
>> +	if (IS_ERR(host->dma_chan_rxtx)) {
>> +		if (PTR_ERR(host->dma_chan_rxtx) == -EPROBE_DEFER)
>> +			return -EPROBE_DEFER;
> 
> I think you should 'goto err' here, as you have to free the mmc host structure
> allocated earlier in the probe function.

You are right.

> Other than that the patch looks good to me.
> 
> Regards,
> Nicolas
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

      reply	other threads:[~2019-12-17 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 11:26 Peter Ujfalusi
2019-12-17 11:37 ` Nicolas Saenz Julienne
2019-12-17 12:15   ` Peter Ujfalusi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1eecb651-cce7-b099-e2d2-65dcde357a71@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=nsaenzjulienne@suse.de \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome