Skip to content

Commit 5284521

Browse files
tmlindlinusw
authored andcommitted
gpio: omap: Get rid of pm_runtime_irq_safe()
If a gpio instance has any GPIO bits requested we do a pm_runtime_get() on the device. Now with cpu_pm handling the deeper SoC idle state quirks, let's just remove pm_runtime_irq_safe() call and add a warning in case we ever happen to encounter it. Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Keerthy <j-keerthy@ti.com> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent b764a58 commit 5284521

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio-omap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,9 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
763763
if (WARN_ON(!isr_reg))
764764
goto exit;
765765

766-
pm_runtime_get_sync(bank->chip.parent);
766+
if (WARN_ONCE(!pm_runtime_active(bank->chip.parent),
767+
"gpio irq%i while runtime suspended?\n", irq))
768+
return IRQ_NONE;
767769

768770
while (1) {
769771
raw_spin_lock_irqsave(&bank->lock, lock_flags);
@@ -814,7 +816,6 @@ static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
814816
}
815817
}
816818
exit:
817-
pm_runtime_put(bank->chip.parent);
818819
return IRQ_HANDLED;
819820
}
820821

@@ -1466,7 +1467,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
14661467
platform_set_drvdata(pdev, bank);
14671468

14681469
pm_runtime_enable(dev);
1469-
pm_runtime_irq_safe(dev);
14701470
pm_runtime_get_sync(dev);
14711471

14721472
if (bank->is_mpuio)

0 commit comments

Comments
 (0)