]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/video/vesafb.c
Create platform_device.h to contain all the platform device details.
[mirror_ubuntu-zesty-kernel.git] / drivers / video / vesafb.c
index 1ca80264c7b00a13036f887e4438ab052ca68fd5..3cc23106641db10e1a7787f52c5f9c3ee6d4dcf1 100644 (file)
@@ -19,6 +19,8 @@
 #include <linux/fb.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
+
 #include <video/vga.h>
 #include <asm/io.h>
 #include <asm/mtrr.h>
@@ -96,14 +98,14 @@ static int vesafb_blank(int blank, struct fb_info *info)
                int loop = 10000;
                u8 seq = 0, crtc17 = 0;
 
-               err = 0;
-
-               if (blank) {
+               if (blank == FB_BLANK_POWERDOWN) {
                        seq = 0x20;
                        crtc17 = 0x00;
+                       err = 0;
                } else {
                        seq = 0x00;
                        crtc17 = 0x80;
+                       err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL;
                }
 
                vga_wseq(NULL, 0x00, 0x01);