Skip to content

Commit

Permalink
[platinumfb] Ifdef for when CONFIG_NVRAM isn't enabled.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Collins <[email protected]>
  • Loading branch information
benmcollins committed Oct 18, 2006
1 parent b023429 commit f3f6f9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/platinumfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,20 +339,23 @@ 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) {
default_vmode = mac_map_monitor_sense(sense);
}
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;
/*
Expand Down

0 comments on commit f3f6f9a

Please sign in to comment.