sm501fb: Call fb suspend function during suspend and resume
authorBen Dooks <ben-linux@fluff.org>
Tue, 16 Oct 2007 08:28:38 +0000 (01:28 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:14 +0000 (09:43 -0700)
Call the fb_set_suspend() over suspend and resume.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/sm501fb.c

index fc0cdc830360ea87137dc5574dbc5f75dc54d43a..d97edd7a6e415949384f5f216905fe45cc557017 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/wait.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/console.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -1697,6 +1698,10 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info,
        /* blank the relevant interface to ensure unit power minimised */
        (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
 
+       acquire_console_sem();
+       fb_set_suspend(fbi, 1);
+       release_console_sem();
+
        return 0;
 
  err_nocursor:
@@ -1732,6 +1737,10 @@ static void sm501fb_resume_fb(struct sm501fb_info *info,
                memcpy_toio(par->cursor.k_addr, par->store_cursor,
                            par->cursor.size);
 
+       acquire_console_sem();
+       fb_set_suspend(fbi, 0);
+       release_console_sem();
+
        vfree(par->store_fb);
        vfree(par->store_cursor);
 }