From: Vinod Koul <vkoul@kernel.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Prabhakar <prabhakar.csengg@gmail.com>,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt
Date: Thu, 6 Jan 2022 10:57:08 +0530 [thread overview]
Message-ID: <YdZ9rDvYtdu8L8Vb@matsya> (raw)
In-Reply-To: <20220104163519.21929-3-prabhakar.mahadev-lad.rj@bp.renesas.com>
On 04-01-22, 16:35, Lad Prabhakar wrote:
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq().
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> * No change
> ---
> drivers/dma/mediatek/mtk-hsdma.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
> index 6ad8afbb95f2..c0fffde7fe08 100644
> --- a/drivers/dma/mediatek/mtk-hsdma.c
> +++ b/drivers/dma/mediatek/mtk-hsdma.c
> @@ -923,13 +923,10 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
> return PTR_ERR(hsdma->clk);
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!res) {
> - dev_err(&pdev->dev, "No irq resource for %s\n",
> - dev_name(&pdev->dev));
> - return -EINVAL;
> - }
> - hsdma->irq = res->start;
> + err = platform_get_irq(pdev, 0);
why not platform_get_irq_optional() here and 3rd patch ?
> + if (err < 0)
> + return err;
> + hsdma->irq = err;
>
> refcount_set(&hsdma->pc_refcnt, 0);
> spin_lock_init(&hsdma->lock);
> --
> 2.17.1
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-06 5:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 16:35 [PATCH v2 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's Lad Prabhakar
2022-01-04 16:35 ` [PATCH v2 2/3] dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt Lad Prabhakar
2022-01-06 5:27 ` Vinod Koul [this message]
2022-01-06 8:44 ` Lad, Prabhakar
2022-01-04 16:35 ` [PATCH v2 3/3] dmaengine: mediatek-cqdma: " Lad Prabhakar
2022-01-05 9:56 ` [PATCH v2 0/3] dmaengine: Use platform_get_irq*() variants to fetch IRQ's Andy Shevchenko
2022-03-09 11:37 ` Lad, Prabhakar
2022-03-11 10:36 ` 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=YdZ9rDvYtdu8L8Vb@matsya \
--to=vkoul@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).