summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-10-20 00:01:43 +0800
committerAndy Green <andy.green@linaro.org>2011-10-20 00:01:43 +0800
commit10cfb664dcc28dfd6121dd1792a7ff3d80872863 (patch)
tree04081c4dba1f6b023daee618c175b0962768b804
parent380b977274815cea237f18360d726de16ccd9fe0 (diff)
earlysuspend: Update acquire/release_console_sem usage to console_lock/unlocklinaro-androidization-tracking-2011-10-20-00-30-CST
aquire/release_console_sem() has been removed from the kernel since 2.6.37 So this patch updates earlysuspend to use the current console_lock/unlock() methods. Reported-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--kernel/power/consoleearlysuspend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/consoleearlysuspend.c b/kernel/power/consoleearlysuspend.c
index a3edcb26738..3f0c8685fe1 100644
--- a/kernel/power/consoleearlysuspend.c
+++ b/kernel/power/consoleearlysuspend.c
@@ -25,28 +25,28 @@
static int orig_fgconsole;
static void console_early_suspend(struct early_suspend *h)
{
- acquire_console_sem();
+ console_lock();
orig_fgconsole = fg_console;
if (vc_allocate(EARLY_SUSPEND_CONSOLE))
goto err;
if (set_console(EARLY_SUSPEND_CONSOLE))
goto err;
- release_console_sem();
+ console_unlock();
if (vt_waitactive(EARLY_SUSPEND_CONSOLE + 1))
pr_warning("console_early_suspend: Can't switch VCs.\n");
return;
err:
pr_warning("console_early_suspend: Can't set console\n");
- release_console_sem();
+ console_unlock();
}
static void console_late_resume(struct early_suspend *h)
{
int ret;
- acquire_console_sem();
+ console_lock();
ret = set_console(orig_fgconsole);
- release_console_sem();
+ console_unlock();
if (ret) {
pr_warning("console_late_resume: Can't set console.\n");
return;