Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: n64: Use platform_get_irq() to get the interrupt
@ 2022-03-01  8:55 Zhen Ni
  2022-03-01  9:36 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Zhen Ni @ 2022-03-01  8:55 UTC (permalink / raw)
  To: perex, tiwai; +Cc: Zhen Ni, alsa-devel, linux-kernel

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 bypassed the hierarchical setup and messed 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: Zhen Ni <nizhen@uniontech.com>
---
 sound/mips/snd-n64.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/mips/snd-n64.c b/sound/mips/snd-n64.c
index 463a6fe589eb..19365aab15ba 100644
--- a/sound/mips/snd-n64.c
+++ b/sound/mips/snd-n64.c
@@ -289,7 +289,7 @@ static int __init n64audio_probe(struct platform_device *pdev)
 	struct snd_card *card;
 	struct snd_pcm *pcm;
 	struct n64audio *priv;
-	struct resource *res;
+	int irq;
 	int err;
 
 	err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
@@ -337,12 +337,12 @@ static int __init n64audio_probe(struct platform_device *pdev)
 	strcpy(card->shortname, "N64 Audio");
 	strcpy(card->longname, "N64 Audio");
 
-	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-	if (!res) {
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
 		err = -EINVAL;
 		goto fail_dma_alloc;
 	}
-	if (devm_request_irq(&pdev->dev, res->start, n64audio_isr,
+	if (devm_request_irq(&pdev->dev, irq, n64audio_isr,
 				IRQF_SHARED, "N64 Audio", priv)) {
 		err = -EBUSY;
 		goto fail_dma_alloc;
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: n64: Use platform_get_irq() to get the interrupt
  2022-03-01  8:55 [PATCH] ALSA: n64: Use platform_get_irq() to get the interrupt Zhen Ni
@ 2022-03-01  9:36 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2022-03-01  9:36 UTC (permalink / raw)
  To: Zhen Ni; +Cc: linux-kernel, alsa-devel, tiwai

On Tue, 01 Mar 2022 09:55:36 +0100,
Zhen Ni 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 bypassed the hierarchical setup and messed 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: Zhen Ni <nizhen@uniontech.com>

The same fix has been already queued at commit a544684b790f.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-02  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01  8:55 [PATCH] ALSA: n64: Use platform_get_irq() to get the interrupt Zhen Ni
2022-03-01  9:36 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox