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

net: ethoc: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Lad Prabhakar and committed by
David S. Miller
6c119fbd 441fadda

+3 -6
+3 -6
drivers/net/ethernet/ethoc.c
··· 1078 1078 1079 1079 1080 1080 /* obtain device IRQ number */ 1081 - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1082 - if (!res) { 1083 - dev_err(&pdev->dev, "cannot obtain IRQ\n"); 1084 - ret = -ENXIO; 1081 + ret = platform_get_irq(pdev, 0); 1082 + if (ret < 0) 1085 1083 goto free; 1086 - } 1087 1084 1088 - netdev->irq = res->start; 1085 + netdev->irq = ret; 1089 1086 1090 1087 /* setup driver-private data */ 1091 1088 priv = netdev_priv(netdev);