Skip to content

Commit

Permalink
pxafb: do console locking before calling fb_blank()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasily Khoruzhick authored and Florian Tobias Schandinat committed Mar 6, 2012
1 parent d282e4d commit 23f1365
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 23f1365

Please sign in to comment.