aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorBen Collins <bcollins@ubuntu.com>2006-10-18 08:52:48 -0400
committerBen Collins <bcollins@ubuntu.com>2006-10-18 08:52:48 -0400
commitf3f6f9aaced9c8453ef45956a23295e5c2328124 (patch)
tree878450b1a2a6c63f54b9aa84cdfb138141f4244e /drivers/video
parentb023429ca30fc18b17a7b3e279b55bd652e9a989 (diff)
[platinumfb] Ifdef for when CONFIG_NVRAM isn't enabled.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/platinumfb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 983be3ec234..fdb33cd21a2 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -339,11 +339,12 @@ static int __devinit platinum_init_fb(struct fb_info *info)
sense = read_platinum_sense(pinfo);
printk(KERN_INFO "platinumfb: Monitor sense value = 0x%x, ", sense);
-
if (default_vmode == VMODE_NVRAM) {
+#ifdef CONFIG_NVRAM
default_vmode = nvram_read_byte(NV_VMODE);
if (default_vmode <= 0 || default_vmode > VMODE_MAX ||
!platinum_reg_init[default_vmode-1])
+#endif
default_vmode = VMODE_CHOOSE;
}
if (default_vmode == VMODE_CHOOSE) {
@@ -351,8 +352,10 @@ static int __devinit platinum_init_fb(struct fb_info *info)
}
if (default_vmode <= 0 || default_vmode > VMODE_MAX)
default_vmode = VMODE_640_480_60;
+#ifdef CONFIG_NVRAM
if (default_cmode == CMODE_NVRAM)
default_cmode = nvram_read_byte(NV_CMODE);
+#endif
if (default_cmode < CMODE_8 || default_cmode > CMODE_32)
default_cmode = CMODE_8;
/*