net: dsa: mv88e6xxx: Release lock while requesting IRQ
authorAndrew Lunn <andrew@lunn.ch>
Sat, 23 Feb 2019 16:43:57 +0000 (17:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 06:21:23 +0000 (22:21 -0800)
There is no need to hold the register lock while requesting the GPIO
interrupt. By not holding it we can also avoid a false positive
lockdep splat.

Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c

index 3546c5e2b924241e1f1a21f7d51d0f1174e197bc..d30336f259cef9e306f38d55457021131db5880d 100644 (file)
@@ -456,10 +456,12 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
         */
        irq_set_lockdep_class(chip->irq, &lock_key, &request_key);
 
+       mutex_unlock(&chip->reg_lock);
        err = request_threaded_irq(chip->irq, NULL,
                                   mv88e6xxx_g1_irq_thread_fn,
                                   IRQF_ONESHOT | IRQF_SHARED,
                                   dev_name(chip->dev), chip);
+       mutex_lock(&chip->reg_lock);
        if (err)
                mv88e6xxx_g1_irq_free_common(chip);