From 0e1b322451b7a49487d2d17a147db1aa1d1119fa Mon Sep 17 00:00:00 2001 From: Tarun Kanti DebBarma Date: Tue, 26 Jun 2012 12:13:47 +0530 Subject: [PATCH] gpio/omap: enabled_non_wakeup_gpios check skips bank->saved_datain Commit b3c64bc30af67ed328a8d919e41160942b870451 (gpio/omap: (re)fix wakeups on level-triggered GPIOs) still skips update of bank->saved_datain in *_runtime_suspend() which must be done irrespective of edge/level trigger types. Therefore, move the enbaled_non_wakeup_gpios check after the bank->saved_datain is updated. Signed-off-by: Tarun Kanti DebBarma --- drivers/gpio/gpio-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index c4ed172..94ecdcf 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1177,9 +1177,6 @@ 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; @@ -1191,6 +1188,10 @@ static int omap_gpio_runtime_suspend(struct device *dev) */ bank->saved_datain = __raw_readl(bank->base + bank->regs->datain); + + if (!bank->enabled_non_wakeup_gpios) + goto update_gpio_context_count; + l1 = bank->context.fallingdetect; l2 = bank->context.risingdetect; -- 1.7.0.4