ALSA: n64: Use platform_get_irq() to get the interrupt
PATCH 1/1 ALSA: n64: Use platform_get_irq() to get the interrupt
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().
--- sound/mips/snd-n64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/mips/snd-n64.c +4 -4
@@ -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;
Signature · 1 line
2.20.1
Quoted 11 lines · Zhen Ni
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 <[email protected]>
The same fix has been already queued at commit a544684b790f.
thanks,
Takashi