net: dsa: mv88e6xxx: Unique watchdog IRQ name
authorAndrew Lunn <andrew@lunn.ch>
Mon, 6 Jan 2020 16:13:50 +0000 (17:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jan 2020 02:30:14 +0000 (18:30 -0800)
Dynamically generate a unique watchdog interrupt name, based on the
device name.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/global2.c

index b7613ef600d275b321fb64eeb9a51227333997e1..3558c677e1d3c2140d4c16ad026eb46a7d1210e5 100644 (file)
@@ -296,6 +296,7 @@ struct mv88e6xxx_chip {
        char irq_name[32];
        int device_irq;
        int watchdog_irq;
+       char watchdog_irq_name[32];
 
        int atu_prob_irq;
        int vtu_prob_irq;
index 87bfe7c8c9cda13ef41cce125ee3bd282063e0a2..617174e94faa1d38b50176ad0986e248415c8c86 100644 (file)
@@ -948,10 +948,13 @@ static int mv88e6xxx_g2_watchdog_setup(struct mv88e6xxx_chip *chip)
        if (chip->watchdog_irq < 0)
                return chip->watchdog_irq;
 
+       snprintf(chip->watchdog_irq_name, sizeof(chip->watchdog_irq_name),
+                "mv88e6xxx-%s-watchdog", dev_name(chip->dev));
+
        err = request_threaded_irq(chip->watchdog_irq, NULL,
                                   mv88e6xxx_g2_watchdog_thread_fn,
                                   IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
-                                  "mv88e6xxx-watchdog", chip);
+                                  chip->watchdog_irq_name, chip);
        if (err)
                return err;