diff options
author | Ben Collins <bcollins@ubuntu.com> | 2006-10-18 08:52:48 -0400 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-10-18 08:52:48 -0400 |
commit | f3f6f9aaced9c8453ef45956a23295e5c2328124 (patch) | |
tree | 878450b1a2a6c63f54b9aa84cdfb138141f4244e | |
parent | b023429ca30fc18b17a7b3e279b55bd652e9a989 (diff) |
[platinumfb] Ifdef for when CONFIG_NVRAM isn't enabled.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
-rw-r--r-- | drivers/video/platinumfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 983be3ec2345..fdb33cd21a27 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) | |||
339 | 339 | ||
340 | sense = read_platinum_sense(pinfo); | 340 | sense = read_platinum_sense(pinfo); |
341 | printk(KERN_INFO "platinumfb: Monitor sense value = 0x%x, ", sense); | 341 | printk(KERN_INFO "platinumfb: Monitor sense value = 0x%x, ", sense); |
342 | |||
343 | if (default_vmode == VMODE_NVRAM) { | 342 | if (default_vmode == VMODE_NVRAM) { |
343 | #ifdef CONFIG_NVRAM | ||
344 | default_vmode = nvram_read_byte(NV_VMODE); | 344 | default_vmode = nvram_read_byte(NV_VMODE); |
345 | if (default_vmode <= 0 || default_vmode > VMODE_MAX || | 345 | if (default_vmode <= 0 || default_vmode > VMODE_MAX || |
346 | !platinum_reg_init[default_vmode-1]) | 346 | !platinum_reg_init[default_vmode-1]) |
347 | #endif | ||
347 | default_vmode = VMODE_CHOOSE; | 348 | default_vmode = VMODE_CHOOSE; |
348 | } | 349 | } |
349 | if (default_vmode == VMODE_CHOOSE) { | 350 | if (default_vmode == VMODE_CHOOSE) { |
@@ -351,8 +352,10 @@ static int __devinit platinum_init_fb(struct fb_info *info) | |||
351 | } | 352 | } |
352 | if (default_vmode <= 0 || default_vmode > VMODE_MAX) | 353 | if (default_vmode <= 0 || default_vmode > VMODE_MAX) |
353 | default_vmode = VMODE_640_480_60; | 354 | default_vmode = VMODE_640_480_60; |
355 | #ifdef CONFIG_NVRAM | ||
354 | if (default_cmode == CMODE_NVRAM) | 356 | if (default_cmode == CMODE_NVRAM) |
355 | default_cmode = nvram_read_byte(NV_CMODE); | 357 | default_cmode = nvram_read_byte(NV_CMODE); |
358 | #endif | ||
356 | if (default_cmode < CMODE_8 || default_cmode > CMODE_32) | 359 | if (default_cmode < CMODE_8 || default_cmode > CMODE_32) |
357 | default_cmode = CMODE_8; | 360 | default_cmode = CMODE_8; |
358 | /* | 361 | /* |