X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fcontrolfb.c;h=04c6d928189b82b1c761fafb5ea408267c187958;hb=af60496f746596fdbc7a9ffa1a96f97e1bc59bcf;hp=03798e9c882d813d2ab0a62a1b85f5e3272273f8;hpb=ab396e91bfe953db26fa1083d9c3e7a4fbe0334a;p=linux-2.6 diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index 03798e9c88..04c6d92818 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c @@ -31,13 +31,11 @@ * more details. */ -#include #include #include #include #include #include -#include #include #include #include @@ -128,7 +126,7 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var, static int controlfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info); static int controlfb_blank(int blank_mode, struct fb_info *info); -static int controlfb_mmap(struct fb_info *info, struct file *file, +static int controlfb_mmap(struct fb_info *info, struct vm_area_struct *vma); static int controlfb_set_par (struct fb_info *info); static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info); @@ -280,7 +278,7 @@ static int controlfb_pan_display(struct fb_var_screeninfo *var, * for controlfb. * Note there's no locking in here; it's done in fb_mmap() in fbmem.c. */ -static int controlfb_mmap(struct fb_info *info, struct file *file, +static int controlfb_mmap(struct fb_info *info, struct vm_area_struct *vma) { unsigned long off, start; @@ -417,13 +415,15 @@ static int __init init_control(struct fb_info_control *p) full = p->total_vram == 0x400000; /* Try to pick a video mode out of NVRAM if we have one. */ +#ifdef CONFIG_NVRAM if (default_cmode == CMODE_NVRAM){ cmode = nvram_read_byte(NV_CMODE); if(cmode < CMODE_8 || cmode > CMODE_32) cmode = CMODE_8; } else +#endif cmode=default_cmode; - +#ifdef CONFIG_NVRAM if (default_vmode == VMODE_NVRAM) { vmode = nvram_read_byte(NV_VMODE); if (vmode < 1 || vmode > VMODE_MAX || @@ -434,7 +434,9 @@ static int __init init_control(struct fb_info_control *p) if (control_mac_modes[vmode - 1].m[full] < cmode) vmode = VMODE_640_480_60; } - } else { + } else +#endif + { vmode=default_vmode; if (control_mac_modes[vmode - 1].m[full] < cmode) { if (cmode > CMODE_8)