From b4cfc01bc9ebacdca6ebf0654bf69fa362640c1b Mon Sep 17 00:00:00 2001 From: Tarun Kanti DebBarma Date: Fri, 27 Apr 2012 19:43:38 +0530 Subject: [PATCH] --- yaml --- r: 307681 b: refs/heads/master c: 1b1287032df3a69d3ef9a486b444f4ffcca50d01 h: refs/heads/master i: 307679: a41e08a3897ec3aa31e288676e124aed36b8f4d2 v: v3 --- [refs] | 2 +- trunk/drivers/gpio/gpio-omap.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9fe26c8eca4c..e1b7135da662 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4e962e8998cc6cb5e58beae5feb6a65cb1a27f26 +refs/heads/master: 1b1287032df3a69d3ef9a486b444f4ffcca50d01 diff --git a/trunk/drivers/gpio/gpio-omap.c b/trunk/drivers/gpio/gpio-omap.c index 2c70617e6b45..9b71f04538aa 100644 --- a/trunk/drivers/gpio/gpio-omap.c +++ b/trunk/drivers/gpio/gpio-omap.c @@ -1157,6 +1157,9 @@ 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. * @@ -1232,11 +1235,6 @@ static int omap_gpio_runtime_resume(struct device *dev) __raw_writel(bank->context.risingdetect, bank->base + bank->regs->risingdetect); - if (!bank->workaround_enabled) { - spin_unlock_irqrestore(&bank->lock, flags); - return 0; - } - if (bank->get_context_loss_count) { context_lost_cnt_after = bank->get_context_loss_count(bank->dev); @@ -1249,6 +1247,11 @@ static int omap_gpio_runtime_resume(struct device *dev) } } + if (!bank->workaround_enabled) { + spin_unlock_irqrestore(&bank->lock, flags); + return 0; + } + __raw_writel(bank->context.fallingdetect, bank->base + bank->regs->fallingdetect); __raw_writel(bank->context.risingdetect,