net: dsa: mv88e6xxx: Unique IRQ name
authorAndrew Lunn <andrew@lunn.ch>
Mon, 6 Jan 2020 16:13:48 +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 switch 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.c
drivers/net/dsa/mv88e6xxx/chip.h

index 5eeeb6566196b92923fe41117545f6fa42be9e60..e21e460c11f774463b8eee91951b7dfd85727d90 100644 (file)
@@ -340,11 +340,14 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
         */
        irq_set_lockdep_class(chip->irq, &lock_key, &request_key);
 
+       snprintf(chip->irq_name, sizeof(chip->irq_name),
+                "mv88e6xxx-%s", dev_name(chip->dev));
+
        mv88e6xxx_reg_unlock(chip);
        err = request_threaded_irq(chip->irq, NULL,
                                   mv88e6xxx_g1_irq_thread_fn,
                                   IRQF_ONESHOT | IRQF_SHARED,
-                                  dev_name(chip->dev), chip);
+                                  chip->irq_name, chip);
        mv88e6xxx_reg_lock(chip);
        if (err)
                mv88e6xxx_g1_irq_free_common(chip);
index 8a8e38bfb16114070bdb3645886774ac2bda4e58..03aec58513abf3bb74327b9a4cd4fbcb60ad09ec 100644 (file)
@@ -292,6 +292,7 @@ struct mv88e6xxx_chip {
        struct mv88e6xxx_irq g1_irq;
        struct mv88e6xxx_irq g2_irq;
        int irq;
+       char irq_name[32];
        int device_irq;
        int watchdog_irq;