Skip to content

Commit

Permalink
platform: goldfish: pipe: Use platform_get_irq() to get the interrupt
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20220309202327.16627-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Lad Prabhakar authored and Greg Kroah-Hartman committed Mar 18, 2022
1 parent 3b2e6a9 commit 1456277
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/platform/goldfish/goldfish_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev)
return -EINVAL;
}

r = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!r)
return -EINVAL;

dev->irq = r->start;
dev->irq = platform_get_irq(pdev, 0);
if (dev->irq < 0)
return dev->irq;

/*
* Exchange the versions with the host device
Expand Down

0 comments on commit 1456277

Please sign in to comment.