Skip to content

Commit 6ea68fc

Browse files
digetxbrgl
authored andcommitted
gpio: tegra: Add lockdep class
Add lockdep class in order to fix debug warnings that are coming from a legit nested use of irq_set_irq_wake() by the Tegra GPIO driver. WARNING: possible recursive locking detected ... (irq_set_irq_wake) from (tegra_gpio_irq_set_wake) (tegra_gpio_irq_set_wake) from (irq_set_irq_wake) (irq_set_irq_wake) from (brcmf_sdiod_intr_register [brcmfmac]) ... Tested-by: Peter Geis <pgwipeout@gmail.com> Reported-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
1 parent 183245c commit 6ea68fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpio/gpio-tegra.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ static const struct dev_pm_ops tegra_gpio_pm_ops = {
560560
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
561561
};
562562

563+
static struct lock_class_key gpio_lock_class;
564+
static struct lock_class_key gpio_request_class;
565+
563566
static int tegra_gpio_probe(struct platform_device *pdev)
564567
{
565568
struct tegra_gpio_info *tgi;
@@ -661,6 +664,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
661664
bank = &tgi->bank_info[GPIO_BANK(gpio)];
662665

663666
irq_set_chip_data(irq, bank);
667+
irq_set_lockdep_class(irq, &gpio_lock_class, &gpio_request_class);
664668
irq_set_chip_and_handler(irq, &tgi->ic, handle_simple_irq);
665669
}
666670

0 commit comments

Comments
 (0)