Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: axis-fifo: 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 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/20211224161334.31123-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lad Prabhakar and committed by
Greg Kroah-Hartman
790ada0e 683fade1

+3 -8
+3 -8
drivers/staging/axis-fifo/axis-fifo.c
··· 809 809 810 810 static int axis_fifo_probe(struct platform_device *pdev) 811 811 { 812 - struct resource *r_irq; /* interrupt resources */ 813 812 struct resource *r_mem; /* IO mem resources */ 814 813 struct device *dev = &pdev->dev; /* OS device (from device tree) */ 815 814 struct axis_fifo *fifo = NULL; ··· 881 882 */ 882 883 883 884 /* get IRQ resource */ 884 - r_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 885 - if (!r_irq) { 886 - dev_err(fifo->dt_device, "no IRQ found for 0x%pa\n", 887 - &r_mem->start); 888 - rc = -EIO; 885 + rc = platform_get_irq(pdev, 0); 886 + if (rc < 0) 889 887 goto err_initial; 890 - } 891 888 892 889 /* request IRQ */ 893 - fifo->irq = r_irq->start; 890 + fifo->irq = rc; 894 891 rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0, 895 892 DRIVER_NAME, fifo); 896 893 if (rc) {