mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -1851,7 +1851,7 @@ static int axienet_probe(struct platform_device *pdev)
|
||||||
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
lp->rx_irq = irq_of_parse_and_map(np, 1);
|
||||||
lp->tx_irq = irq_of_parse_and_map(np, 0);
|
lp->tx_irq = irq_of_parse_and_map(np, 0);
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
lp->eth_irq = platform_get_irq(pdev, 0);
|
lp->eth_irq = platform_get_irq_optional(pdev, 0);
|
||||||
} else {
|
} else {
|
||||||
/* Check for these resources directly on the Ethernet node. */
|
/* Check for these resources directly on the Ethernet node. */
|
||||||
struct resource *res = platform_get_resource(pdev,
|
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->dma_regs = devm_ioremap_resource(&pdev->dev, res);
|
||||||
lp->rx_irq = platform_get_irq(pdev, 1);
|
lp->rx_irq = platform_get_irq(pdev, 1);
|
||||||
lp->tx_irq = platform_get_irq(pdev, 0);
|
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)) {
|
if (IS_ERR(lp->dma_regs)) {
|
||||||
dev_err(&pdev->dev, "could not map DMA regs\n");
|
dev_err(&pdev->dev, "could not map DMA regs\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue