From: Tarun Kanti DebBarma Date: Mon, 5 Mar 2012 10:30:54 +0000 (+0530) Subject: gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_* X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=960edffe29dfd845ee532ee51398592cba96d701;p=linux-beck.git gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_* In omap_gpio_runtime_suspend/resume() the context save/restore should be independent of bank->enabled_non_wakeup_gpios. This was preventing context restore of GPIO lines which are not wakeup enabled. Reported-by: Govindraj Raja Signed-off-by: Tarun Kanti DebBarma Reviewed-by: Santosh Shilimkar Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman --- diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index bbe964899017..bcb1061dbd6d 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1247,9 +1247,6 @@ static int omap_gpio_runtime_suspend(struct device *dev) * non-wakeup GPIOs. Otherwise spurious IRQs will be * generated. See OMAP2420 Errata item 1.101. */ - if (!(bank->enabled_non_wakeup_gpios)) - goto update_gpio_context_count; - bank->saved_datain = __raw_readl(bank->base + bank->regs->datain); l1 = __raw_readl(bank->base + bank->regs->fallingdetect); @@ -1298,7 +1295,7 @@ static int omap_gpio_runtime_resume(struct device *dev) __raw_writel(bank->context.risingdetect, bank->base + bank->regs->risingdetect); - if (!bank->enabled_non_wakeup_gpios || !bank->workaround_enabled) { + if (!bank->workaround_enabled) { spin_unlock_irqrestore(&bank->lock, flags); return 0; }