mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
net: axienet: Mark eth_irq as optional
According to the DT binding, the Ethernet core interrupt is optional. Use platform_get_irq_optional() to avoid the error message when the IRQ is not specified. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
71791dc8bd
commit
d6349e3e14
@ -1851,7 +1851,7 @@ static int axienet_probe(struct platform_device *pdev)
|
||||
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
||||
lp->tx_irq = irq_of_parse_and_map(np, 0);
|
||||
of_node_put(np);
|
||||
lp->eth_irq = platform_get_irq(pdev, 0);
|
||||
lp->eth_irq = platform_get_irq_optional(pdev, 0);
|
||||
} else {
|
||||
/* Check for these resources directly on the Ethernet node. */
|
||||
struct resource *res = platform_get_resource(pdev,
|
||||
@ -1859,7 +1859,7 @@ static int axienet_probe(struct platform_device *pdev)
|
||||
lp->dma_regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
lp->rx_irq = platform_get_irq(pdev, 1);
|
||||
lp->tx_irq = platform_get_irq(pdev, 0);
|
||||
lp->eth_irq = platform_get_irq(pdev, 2);
|
||||
lp->eth_irq = platform_get_irq_optional(pdev, 2);
|
||||
}
|
||||
if (IS_ERR(lp->dma_regs)) {
|
||||
dev_err(&pdev->dev, "could not map DMA regs\n");
|
||||
|
Loading…
Reference in New Issue
Block a user