net: ethernet: ti: davinci_emac: Use platform_get_irq() to get the interrupt
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 10 Mar 2022 01:26:06 +0000 (01:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Mar 2022 11:01:42 +0000 (11:01 +0000)
commit7cd08f108d950726c9e3a5061d69a20c7a37e3c4
treed5b18cf8c76fb0d24afe6bb84bbebd8d94d68f5c
parente8609e69470f369509b44d5f2619f94541fe9df6
net: ethernet: ti: davinci_emac: 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() for DT users only.

While at it propagate error code in emac_dev_stop() in case
platform_get_irq_optional() fails.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_emac.c