drivers/video/: Spelling fixes
[sfrench/cifs-2.6.git] / drivers / video / sm501fb.c
index fc0cdc830360ea87137dc5574dbc5f75dc54d43a..58f200c69be31378585fa34961439c584ef3a441 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>
@@ -47,7 +48,7 @@ enum sm501_controller {
        HEAD_PANEL      = 1,
 };
 
-/* SM501 memory adress */
+/* SM501 memory address */
 struct sm501_mem {
        unsigned long    size;
        unsigned long    sm_addr;
@@ -776,6 +777,11 @@ static int sm501fb_set_par_pnl(struct fb_info *info)
        writel(control, fbi->regs + SM501_DC_PANEL_CONTROL);
        sm501fb_sync_regs(fbi);
 
+       /* ensure the panel interface is not tristated at this point */
+
+       sm501_modify_reg(fbi->dev->parent, SM501_SYSTEM_CONTROL,
+                        0, SM501_SYSCTRL_PANEL_TRISTATE);
+
        /* power the panel up */
        sm501fb_panel_power(fbi, 1);
        return 0;
@@ -1697,6 +1703,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 +1742,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);
 }