diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index b570a6aae6e697aa2de5f7c6766baec02bceb415..c4ed1722734c9eadb190c0ccaa19a9c2eb3b2d39 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1157,9 +1157,6 @@ static int omap_gpio_runtime_suspend(struct device *dev) spin_lock_irqsave(&bank->lock, flags); - if (!bank->enabled_non_wakeup_gpios) - goto update_gpio_context_count; - /* * Only edges can generate a wakeup event to the PRCM. * @@ -1180,6 +1177,9 @@ static int omap_gpio_runtime_suspend(struct device *dev) __raw_writel(wake_hi | bank->context.risingdetect, bank->base + bank->regs->risingdetect); + if (!bank->enabled_non_wakeup_gpios) + goto update_gpio_context_count; + if (bank->power_mode != OFF_MODE) { bank->power_mode = 0; goto update_gpio_context_count;