From: Tarun Kanti DebBarma Date: Wed, 23 Nov 2011 21:14:29 +0000 (+0530) Subject: gpio/omap: cleanup prepare_for_idle and resume_after_idle X-Git-Tag: v3.4-rc1~65^2~24^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dc983c565e03f6f6f96c5fe7449b65d86af4dee;p=pandora-kernel.git gpio/omap: cleanup prepare_for_idle and resume_after_idle Since *_prepare_for_idle() and *_resume_after_idle() are called with interrupts disabled they should be kept as simple as possible. So, moving most of the stuff to *_runtime_suspend/resume() callbacks. To avoid invalid context restore happening in *_runtime_resume() callback as a result of *_get_sync() call in *_gpio_probe(), update bank->context_loss_count. This would make context restore condition check false in the callback and skip restore until further initialization take place. The workaround_enabled static variable is now a member of struct gpio_bank. Unlike most GPIO registers the OE has 0xffffffff as the default value. To make sure invalid context is not restored, updating the OE context with default value. Signed-off-by: Tarun Kanti DebBarma Signed-off-by: Charulatha V Reviewed-by: Santosh Shilimkar Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman --- Reading git-diff-tree failed