update with proper console locking in un-maintained android code
authormgross <mark.gross@intel.com>
Mon, 18 Jul 2011 21:24:32 +0000 (14:24 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:36:07 +0000 (12:36 -0800)
Change-Id: If0b845548eff9baac0ccfcaf52613e6276d9f544

kernel/power/consoleearlysuspend.c

index a3edcb2..3f0c868 100644 (file)
 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;