Commit a27415de authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: dsa: mv88e6xxx: Pass interrupt number in platform data

Allow an interrupt number to be passed in the platform data. The
driver will then use it if not zero, otherwise it will poll for
interrupts.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b3600ff
...@@ -4894,12 +4894,17 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) ...@@ -4894,12 +4894,17 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
if (err) if (err)
goto out; goto out;
chip->irq = of_irq_get(np, 0); if (np) {
if (chip->irq == -EPROBE_DEFER) { chip->irq = of_irq_get(np, 0);
err = chip->irq; if (chip->irq == -EPROBE_DEFER) {
goto out; err = chip->irq;
goto out;
}
} }
if (pdata)
chip->irq = pdata->irq;
/* Has to be performed before the MDIO bus is created, because /* Has to be performed before the MDIO bus is created, because
* the PHYs will link their interrupts to these interrupt * the PHYs will link their interrupts to these interrupt
* controllers * controllers
......
...@@ -13,6 +13,7 @@ struct dsa_mv88e6xxx_pdata { ...@@ -13,6 +13,7 @@ struct dsa_mv88e6xxx_pdata {
unsigned int enabled_ports; unsigned int enabled_ports;
struct net_device *netdev; struct net_device *netdev;
u32 eeprom_len; u32 eeprom_len;
int irq;
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment