From: Pierre Yves MORDRET <pierre-yves.mordret@st.com>
To: Fabien Dessenne <fabien.dessenne@st.com>,
Vinod Koul <vkoul@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
<dmaengine@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: stm32-dma: dmaengine: stm32-dma: use platform_get_irq()
Date: Wed, 24 Apr 2019 11:27:20 +0200 [thread overview]
Message-ID: <20f014c3-0511-2b43-bcd2-1ca8cc700d54@st.com> (raw)
In-Reply-To: <1556097685-7236-1-git-send-email-fabien.dessenne@st.com>
Hello
Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>
Thanks
On 4/24/19 11:21 AM, Fabien Dessenne wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for
> requesting IRQ's resources, as they can be not ready yet. Using
> platform_get_irq() instead is preferred for getting IRQ even if it was
> not retrieved earlier.
>
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
> ---
> drivers/dma/stm32-dma.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
> index ba239b5..3306818 100644
> --- a/drivers/dma/stm32-dma.c
> +++ b/drivers/dma/stm32-dma.c
> @@ -1302,13 +1302,14 @@ static int stm32_dma_probe(struct platform_device *pdev)
>
> for (i = 0; i < STM32_DMA_MAX_CHANNELS; i++) {
> chan = &dmadev->chan[i];
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
> - if (!res) {
> - ret = -EINVAL;
> - dev_err(&pdev->dev, "No irq resource for chan %d\n", i);
> + chan->irq = platform_get_irq(pdev, i);
> + if (chan->irq < 0) {
> + ret = chan->irq;
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev,
> + "No irq resource for chan %d\n", i);
> goto err_unregister;
> }
> - chan->irq = res->start;
> ret = devm_request_irq(&pdev->dev, chan->irq,
> stm32_dma_chan_irq, 0,
> dev_name(chan2dev(chan)), chan);
>
next prev parent reply other threads:[~2019-04-24 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 9:21 Fabien Dessenne
2019-04-24 9:27 ` Pierre Yves MORDRET [this message]
2019-04-26 12:20 ` Vinod Koul
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=20f014c3-0511-2b43-bcd2-1ca8cc700d54@st.com \
--to=pierre-yves.mordret@st.com \
--cc=alexandre.torgue@st.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fabien.dessenne@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--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
all inboxes | Powered by JetHome®