]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/boot/video-vesa.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[linux-2.6-omap-h63xx.git] / arch / x86 / boot / video-vesa.c
index 419b5c27337463b59ffc6bf5ae545c25c8aaafbc..75115849af330e057c71eecd845e4b799107a077 100644 (file)
@@ -9,8 +9,6 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * arch/i386/boot/video-vesa.c
- *
  * VESA text modes
  */
 
 static struct vesa_general_info vginfo;
 static struct vesa_mode_info vminfo;
 
-__videocard video_vesa;
+static __videocard video_vesa;
 
+#ifndef _WAKEUP
 static void vesa_store_mode_params_graphics(void);
+#else /* _WAKEUP */
+static inline void vesa_store_mode_params_graphics(void) {}
+#endif /* _WAKEUP */
 
 static int vesa_probe(void)
 {
@@ -86,14 +88,11 @@ static int vesa_probe(void)
                           (vminfo.memory_layout == 4 ||
                            vminfo.memory_layout == 6) &&
                           vminfo.memory_planes == 1) {
-#ifdef CONFIG_FB
+#ifdef CONFIG_FB_BOOT_VESA_SUPPORT
                        /* Graphics mode, color, linear frame buffer
                           supported.  Only register the mode if
                           if framebuffer is configured, however,
-                          otherwise the user will be left without a screen.
-                          We don't require CONFIG_FB_VESA, however, since
-                          some of the other framebuffer drivers can use
-                          this mode-setting, too. */
+                          otherwise the user will be left without a screen. */
                        mi = GET_HEAP(struct mode_info, 1);
                        mi->mode = mode + VIDEO_FIRST_VESA;
                        mi->depth = vminfo.bpp;
@@ -131,10 +130,12 @@ static int vesa_set_mode(struct mode_info *mode)
        if ((vminfo.mode_attr & 0x15) == 0x05) {
                /* It's a supported text mode */
                is_graphic = 0;
+#ifdef CONFIG_FB_BOOT_VESA_SUPPORT
        } else if ((vminfo.mode_attr & 0x99) == 0x99) {
                /* It's a graphics mode with linear frame buffer */
                is_graphic = 1;
                vesa_mode |= 0x4000; /* Request linear frame buffer */
+#endif
        } else {
                return -1;      /* Invalid mode */
        }
@@ -165,6 +166,8 @@ static int vesa_set_mode(struct mode_info *mode)
 }
 
 
+#ifndef _WAKEUP
+
 /* Switch DAC to 8-bit mode */
 static void vesa_dac_set_8bits(void)
 {
@@ -220,7 +223,7 @@ static void vesa_store_pm_info(void)
 static void vesa_store_mode_params_graphics(void)
 {
        /* Tell the kernel we're in VESA graphics mode */
-       boot_params.screen_info.orig_video_isVGA = 0x23;
+       boot_params.screen_info.orig_video_isVGA = VIDEO_TYPE_VLFB;
 
        /* Mode parameters */
        boot_params.screen_info.vesa_attributes = vminfo.mode_attr;
@@ -288,7 +291,9 @@ void vesa_store_edid(void)
 #endif /* CONFIG_FIRMWARE_EDID */
 }
 
-__videocard video_vesa =
+#endif /* not _WAKEUP */
+
+static __videocard video_vesa =
 {
        .card_name      = "VESA",
        .probe          = vesa_probe,