pxafb: do console locking before calling fb_blank()
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 26 Feb 2012 13:52:02 +0000 (16:52 +0300)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Tue, 6 Mar 2012 11:56:48 +0000 (11:56 +0000)
Otherwise we hit WARN_CONSOLE_UNLOCKED in do_unblank_screen

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/pxafb.c

index 1d1e4f175e7844cb0eae129060e4a4d93f78c7c2..c176561a22226a19554863c5466a675e0a15e76d 100644 (file)
@@ -54,6 +54,7 @@
 #include <linux/mutex.h>
 #include <linux/kthread.h>
 #include <linux/freezer.h>
+#include <linux/console.h>
 
 #include <mach/hardware.h>
 #include <asm/io.h>
@@ -730,9 +731,12 @@ static int overlayfb_open(struct fb_info *info, int user)
        if (user == 0)
                return -ENODEV;
 
-       if (ofb->usage++ == 0)
+       if (ofb->usage++ == 0) {
                /* unblank the base framebuffer */
+               console_lock();
                fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK);
+               console_unlock();
+       }
 
        return 0;
 }