dm9000: acquire irq flags from device tree
authorAndrew Ruder <andrew.ruder@elecsyscorp.com>
Wed, 4 Jun 2014 22:28:44 +0000 (17:28 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Jun 2014 22:12:10 +0000 (15:12 -0700)
The DM9000 supports both active high interrupts and active low interrupts.
This is configured via the attached EEPROM.  In the device-tree case, make sure
that the DM9000 driver passes the correct flags to request_irq.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/davicom/dm9000.c

index 8c4b93be333bc704a736fa8333977f7b76800aad..1bdf69985c13f7a545d81e1feae73d505a7bb3ee 100644 (file)
@@ -1291,6 +1291,9 @@ dm9000_open(struct net_device *dev)
        /* If there is no IRQ type specified, default to something that
         * may work, and tell the user that this is a problem */
 
+       if (irqflags == IRQF_TRIGGER_NONE)
+               irqflags = irq_get_trigger_type(dev->irq);
+
        if (irqflags == IRQF_TRIGGER_NONE)
                dev_warn(db->dev, "WARNING: no IRQ resource flags set.\n");