aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-08-12 13:50:16 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-08-12 13:50:16 -0700
commit39fc322c1c9fbc75343fa75f19e2a4f01b5c3cd1 (patch)
treea7ebeb7d4252b63c79e06f88d2188262af903c2e
parent711bae5ff8fc8b2b3a55891f1ce01d7221109df8 (diff)
earlysuspend: Update acquire/release_console_sem usage to console_lock/unlock
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;