net: dsa: mv88e6xxx: Unique g2 IRQ name
authorAndrew Lunn <andrew@lunn.ch>
Mon, 6 Jan 2020 16:13:51 +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 g2 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 3558c677e1d3c2140d4c16ad026eb46a7d1210e5..47fd909fccc2d71cab3d8bb0da0905a5d0cb9ba7 100644 (file)
@@ -295,6 +295,7 @@ struct mv88e6xxx_chip {
        int irq;
        char irq_name[32];
        int device_irq;
+       char device_irq_name[32];
        int watchdog_irq;
        char watchdog_irq_name[32];
 
index 617174e94faa1d38b50176ad0986e248415c8c86..01503014b1ee761571497c5da84758b80a0cce8b 100644 (file)
@@ -1117,9 +1117,12 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
                goto out;
        }
 
+       snprintf(chip->device_irq_name, sizeof(chip->device_irq_name),
+                "mv88e6xxx-%s-g2", dev_name(chip->dev));
+
        err = request_threaded_irq(chip->device_irq, NULL,
                                   mv88e6xxx_g2_irq_thread_fn,
-                                  IRQF_ONESHOT, "mv88e6xxx-g2", chip);
+                                  IRQF_ONESHOT, chip->device_irq_name, chip);
        if (err)
                goto out;