From: "Antonino A. Daplas" The following fields in struct fb_info is specific only to fbcon: - struct timer_ cursor_timer - int currcon Remove them from struct fb_info and place them in fbcon_par so they become invisible from the drivers. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton --- 25-akpm/drivers/video/acornfb.c | 1 25-akpm/drivers/video/aty/radeon_base.c | 1 25-akpm/drivers/video/bw2.c | 1 25-akpm/drivers/video/cg14.c | 1 25-akpm/drivers/video/cg3.c | 1 25-akpm/drivers/video/cg6.c | 1 25-akpm/drivers/video/cirrusfb.c | 1 25-akpm/drivers/video/console/fbcon.c | 82 ++++++++++++++++---------- 25-akpm/drivers/video/console/fbcon.h | 2 25-akpm/drivers/video/ffb.c | 1 25-akpm/drivers/video/gbefb.c | 1 25-akpm/drivers/video/intelfb/intelfbdrv.c | 1 25-akpm/drivers/video/leo.c | 1 25-akpm/drivers/video/matrox/matroxfb_base.c | 26 ++++---- 25-akpm/drivers/video/matrox/matroxfb_crtc2.c | 5 - 25-akpm/drivers/video/p9100.c | 1 25-akpm/drivers/video/pxafb.c | 1 25-akpm/drivers/video/radeonfb.c | 1 25-akpm/drivers/video/sa1100fb.c | 1 25-akpm/drivers/video/sis/sis_main.c | 5 + 25-akpm/drivers/video/sstfb.c | 1 25-akpm/drivers/video/stifb.c | 1 25-akpm/drivers/video/tcx.c | 1 25-akpm/drivers/video/tgafb.c | 1 25-akpm/drivers/video/vga16fb.c | 1 25-akpm/include/linux/fb.h | 2 26 files changed, 73 insertions(+), 69 deletions(-) diff -puN drivers/video/acornfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/acornfb.c --- 25/drivers/video/acornfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/acornfb.c Wed Nov 3 15:18:51 2004 @@ -1326,7 +1326,6 @@ static int __init acornfb_probe(struct d } } - fb_info.currcon = -1; fb_info.screen_base = (char *)SCREEN_BASE; fb_info.fix.smem_start = SCREEN_START; current_par.using_vram = 0; diff -puN drivers/video/aty/radeon_base.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/aty/radeon_base.c --- 25/drivers/video/aty/radeon_base.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/aty/radeon_base.c Wed Nov 3 15:18:51 2004 @@ -1749,7 +1749,6 @@ static int __devinit radeon_set_fbinfo ( { struct fb_info *info = rinfo->info; - info->currcon = -1; info->par = rinfo; info->pseudo_palette = rinfo->pseudo_palette; info->flags = FBINFO_DEFAULT diff -puN drivers/video/bw2.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/bw2.c --- 25/drivers/video/bw2.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/bw2.c Wed Nov 3 15:18:51 2004 @@ -361,7 +361,6 @@ static void bw2_init_one(struct sbus_dev if (!all->info.screen_base) all->info.screen_base = (char *) sbus_ioremap(resp, 0, all->par.fbsize, "bw2 ram"); - all->info.currcon = -1; all->info.par = &all->par; bw2_blank(0, &all->info); diff -puN drivers/video/cg14.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/cg14.c --- 25/drivers/video/cg14.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/cg14.c Wed Nov 3 15:18:51 2004 @@ -552,7 +552,6 @@ static void cg14_init_one(struct sbus_de all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; all->info.fbops = &cg14_ops; - all->info.currcon = -1; all->info.par = &all->par; __cg14_reset(&all->par); diff -puN drivers/video/cg3.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/cg3.c --- 25/drivers/video/cg3.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/cg3.c Wed Nov 3 15:18:51 2004 @@ -408,7 +408,6 @@ static void cg3_init_one(struct sbus_dev all->info.screen_base = (char *) sbus_ioremap(&sdev->resource[0], CG3_RAM_OFFSET, all->par.fbsize, "cg3 ram"); - all->info.currcon = -1; all->info.par = &all->par; cg3_blank(0, &all->info); diff -puN drivers/video/cg6.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/cg6.c --- 25/drivers/video/cg6.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/cg6.c Wed Nov 3 15:18:51 2004 @@ -723,7 +723,6 @@ static void cg6_init_one(struct sbus_dev all->info.screen_base = (char *) sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, all->par.fbsize, "cgsix ram"); - all->info.currcon = -1; all->info.par = &all->par; all->info.var.accel_flags = FB_ACCELF_TEXT; diff -puN drivers/video/cirrusfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/cirrusfb.c --- 25/drivers/video/cirrusfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/cirrusfb.c Wed Nov 3 15:18:51 2004 @@ -2246,7 +2246,6 @@ static int cirrusfb_set_fbinfo(struct ci struct fb_info *info = cinfo->info; struct fb_var_screeninfo *var = &info->var; - info->currcon = -1; info->par = cinfo; info->pseudo_palette = cinfo->pseudo_palette; info->flags = FBINFO_DEFAULT diff -puN drivers/video/console/fbcon.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/console/fbcon.c --- 25/drivers/video/console/fbcon.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/console/fbcon.c Wed Nov 3 15:18:51 2004 @@ -249,8 +249,8 @@ static void fb_flashcursor(void *private int c; int mode; - if (info->currcon != -1) - vc = vc_cons[info->currcon].d; + if (ops->currcon != -1) + vc = vc_cons[ops->currcon].d; if (info->state != FBINFO_STATE_RUNNING || !vc || !CON_IS_VISIBLE(vc) || @@ -284,9 +284,10 @@ static irqreturn_t fb_vbl_handler(int ir static void cursor_timer_handler(unsigned long dev_addr) { struct fb_info *info = (struct fb_info *) dev_addr; - + struct fbcon_ops *ops = info->fbcon_par; + schedule_work(&info->queue); - mod_timer(&info->cursor_timer, jiffies + HZ/5); + mod_timer(&ops->cursor_timer, jiffies + HZ/5); } int __init fb_console_setup(char *this_opt) @@ -502,6 +503,7 @@ static int set_con2fb_map(int unit, int int oldidx = con2fb_map[unit]; struct fb_info *info = registered_fb[newidx]; struct fb_info *oldinfo = NULL; + struct fbcon_ops *ops; int found; if (oldidx == newidx) @@ -524,8 +526,10 @@ static int set_con2fb_map(int unit, int con2fb_map[unit] = newidx; if (!found) { - struct fbcon_ops *ops = NULL; int err = 0; + + ops = NULL; + if (!try_module_get(info->fbops->owner)) { err = -ENODEV; } @@ -560,7 +564,8 @@ static int set_con2fb_map(int unit, int * fbcon should release it. */ if (oldinfo && !search_fb_in_map(oldidx)) { - struct fbcon_ops *ops = (struct fbcon_ops *) oldinfo->fbcon_par; + + ops = oldinfo->fbcon_par; if (oldinfo->fbops->fb_release && oldinfo->fbops->fb_release(oldinfo, 0)) { @@ -574,28 +579,33 @@ static int set_con2fb_map(int unit, int } if (oldinfo->queue.func == fb_flashcursor) - del_timer_sync(&oldinfo->cursor_timer); + del_timer_sync(&ops->cursor_timer); kfree(ops->cursor_state.mask); kfree(ops->cursor_data); kfree(oldinfo->fbcon_par); + oldinfo->fbcon_par = NULL; module_put(oldinfo->fbops->owner); } if (!found) { if (!info->queue.func || info->queue.func == fb_flashcursor) { + + ops = info->fbcon_par; + if (!info->queue.func) INIT_WORK(&info->queue, fb_flashcursor, info); - init_timer(&info->cursor_timer); - info->cursor_timer.function = cursor_timer_handler; - info->cursor_timer.expires = jiffies + HZ / 5; - info->cursor_timer.data = (unsigned long ) info; - add_timer(&info->cursor_timer); + init_timer(&ops->cursor_timer); + ops->cursor_timer.function = cursor_timer_handler; + ops->cursor_timer.expires = jiffies + HZ / 5; + ops->cursor_timer.data = (unsigned long ) info; + add_timer(&ops->cursor_timer); } } - info->currcon = fg_console; + ops = info->fbcon_par; + ops->currcon = fg_console; con2fb_map_boot[unit] = newidx; if (info->fbops->fb_set_par) @@ -690,7 +700,6 @@ static const char *fbcon_startup(void) info = registered_fb[info_idx]; if (!info) return NULL; - info->currcon = -1; owner = info->fbops->owner; if (!try_module_get(owner)) @@ -707,6 +716,7 @@ static const char *fbcon_startup(void) } memset(ops, 0, sizeof(struct fbcon_ops)); + ops->currcon = -1; info->fbcon_par = ops; set_blitting_type(vc, info, NULL); @@ -821,11 +831,11 @@ static const char *fbcon_startup(void) if (!info->queue.func) { INIT_WORK(&info->queue, fb_flashcursor, info); - init_timer(&info->cursor_timer); - info->cursor_timer.function = cursor_timer_handler; - info->cursor_timer.expires = jiffies + HZ / 5; - info->cursor_timer.data = (unsigned long ) info; - add_timer(&info->cursor_timer); + init_timer(&ops->cursor_timer); + ops->cursor_timer.function = cursor_timer_handler; + ops->cursor_timer.expires = jiffies + HZ / 5; + ops->cursor_timer.data = (unsigned long ) info; + add_timer(&ops->cursor_timer); } return display_desc; } @@ -1074,7 +1084,7 @@ static int scrollback_current = 0; int update_var(int con, struct fb_info *info) { - if (con == info->currcon) + if (con == ((struct fbcon_ops *)info->fbcon_par)->currcon) return fb_pan_display(info, &info->var); return 0; } @@ -1877,7 +1887,7 @@ static int fbcon_switch(struct vc_data * logo_shown = FBCON_LOGO_CANSHOW; } - prev_console = info->currcon; + prev_console = ((struct fbcon_ops *)info->fbcon_par)->currcon; /* * FIXME: If we have multiple fbdev's loaded, we need to @@ -1888,10 +1898,12 @@ static int fbcon_switch(struct vc_data * * info->currcon = vc->vc_num; */ for (i = 0; i < FB_MAX; i++) { - if (registered_fb[i] != NULL) - registered_fb[i]->currcon = vc->vc_num; - } + if (registered_fb[i] != NULL && registered_fb[i]->fbcon_par) { + struct fbcon_ops *ops = registered_fb[i]->fbcon_par; + ops->currcon = vc->vc_num; + } + } memset(&var, 0, sizeof(struct fb_var_screeninfo)); display_to_var(&var, p); var.activate = FB_ACTIVATE_NOW; @@ -1960,7 +1972,7 @@ static int fbcon_blank(struct vc_data *v { unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; - struct fbcon_ops *ops = (struct fbcon_ops *) info->fbcon_par; + struct fbcon_ops *ops = info->fbcon_par; struct display *p = &fb_display[vc->vc_num]; int retval = 0; @@ -2517,10 +2529,11 @@ static int fbcon_set_origin(struct vc_da static void fbcon_suspended(struct fb_info *info) { struct vc_data *vc = NULL; + struct fbcon_ops *ops = info->fbcon_par; - if (info->currcon < 0) + if (!ops || ops->currcon < 0) return; - vc = vc_cons[info->currcon].d; + vc = vc_cons[ops->currcon].d; /* Clear cursor, restore saved data */ fbcon_cursor(vc, CM_ERASE); @@ -2529,21 +2542,28 @@ static void fbcon_suspended(struct fb_in static void fbcon_resumed(struct fb_info *info) { struct vc_data *vc; + struct fbcon_ops *ops = info->fbcon_par; - if (info->currcon < 0) + if (!ops || ops->currcon < 0) return; - vc = vc_cons[info->currcon].d; + vc = vc_cons[ops->currcon].d; update_screen(vc->vc_num); } static void fbcon_modechanged(struct fb_info *info) { - struct vc_data *vc = vc_cons[info->currcon].d; + struct fbcon_ops *ops = info->fbcon_par; + struct vc_data *vc; struct display *p; int rows, cols; - if (info->currcon < 0 || vt_cons[info->currcon]->vc_mode != + if (!ops) + return; + + vc = vc_cons[ops->currcon].d; + + if (ops->currcon < 0 || vt_cons[ops->currcon]->vc_mode != KD_TEXT) return; p = &fb_display[vc->vc_num]; diff -puN drivers/video/console/fbcon.h~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/console/fbcon.h --- 25/drivers/video/console/fbcon.h~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/console/fbcon.h Wed Nov 3 15:18:51 2004 @@ -61,7 +61,9 @@ struct fbcon_ops { void (*cursor)(struct vc_data *vc, struct fb_info *info, struct display *p, int mode, int fg, int bg); + struct timer_list cursor_timer; /* Cursor timer */ struct fb_cursor cursor_state; + int currcon; /* Current VC. */ int cursor_flash; char *cursor_data; }; diff -puN drivers/video/ffb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/ffb.c --- 25/drivers/video/ffb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/ffb.c Wed Nov 3 15:18:51 2004 @@ -969,7 +969,6 @@ static void ffb_init_one(int node, int p FBINFO_HWACCEL_IMAGEBLIT); all->info.fbops = &ffb_ops; all->info.screen_base = (char *) all->par.physbase + FFB_DFB24_POFF; - all->info.currcon = -1; all->info.par = &all->par; all->info.pseudo_palette = all->pseudo_palette; diff -puN drivers/video/gbefb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/gbefb.c --- 25/drivers/video/gbefb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/gbefb.c Wed Nov 3 15:18:51 2004 @@ -1140,7 +1140,6 @@ int __init gbefb_init(void) for (i = 0; i < (gbe_mem_size >> TILE_SHIFT); i++) gbe_tiles.cpu[i] = (gbe_mem_phys >> TILE_SHIFT) + i; - fb_info.currcon = -1; fb_info.fbops = &gbefb_ops; fb_info.pseudo_palette = pseudo_palette; fb_info.flags = FBINFO_DEFAULT; diff -puN drivers/video/intelfb/intelfbdrv.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/intelfb/intelfbdrv.c --- 25/drivers/video/intelfb/intelfbdrv.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/intelfb/intelfbdrv.c Wed Nov 3 15:18:51 2004 @@ -1108,7 +1108,6 @@ intelfb_set_fbinfo(struct intelfb_info * DBG_MSG("intelfb_set_fbinfo\n"); - //info->currcon = -1; info->flags = FBINFO_FLAG_DEFAULT; info->fbops = &intel_fb_ops; info->pseudo_palette = dinfo->pseudo_palette; diff -puN drivers/video/leo.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/leo.c --- 25/drivers/video/leo.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/leo.c Wed Nov 3 15:18:51 2004 @@ -590,7 +590,6 @@ static void leo_init_one(struct sbus_dev all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; all->info.fbops = &leo_ops; - all->info.currcon = -1; all->info.par = &all->par; leo_init_wids(&all->info); diff -puN drivers/video/matrox/matroxfb_base.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/matrox/matroxfb_base.c --- 25/drivers/video/matrox/matroxfb_base.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/matrox/matroxfb_base.c Wed Nov 3 15:18:51 2004 @@ -1712,7 +1712,6 @@ static int initMatrox2(WPMINFO struct bo } ACCESS_FBINFO(devflags.ydstorg) = 0; - ACCESS_FBINFO(fbcon.currcon) = -1; ACCESS_FBINFO(video.base) = video_base_phys; ACCESS_FBINFO(video.len_usable) = ACCESS_FBINFO(video.len); if (ACCESS_FBINFO(video.len_usable) > b->base->maxdisplayable) @@ -1877,16 +1876,21 @@ static int initMatrox2(WPMINFO struct bo } printk("fb%d: %s frame buffer device\n", ACCESS_FBINFO(fbcon.node), ACCESS_FBINFO(fbcon.fix.id)); - if (ACCESS_FBINFO(fbcon.currcon) < 0) { - /* there is no console on this fb... but we have to initialize hardware - * until someone tells me what is proper thing to do */ - printk(KERN_INFO "fb%d: initializing hardware\n", - ACCESS_FBINFO(fbcon.node)); - /* We have to use FB_ACTIVATE_FORCE, as we had to put vesafb_defined to the fbcon.var - * already before, so register_framebuffer works correctly. */ - vesafb_defined.activate |= FB_ACTIVATE_FORCE; - fb_set_var(&ACCESS_FBINFO(fbcon), &vesafb_defined); - } + /* + * Tony: If this driver is to be mapped to the console, then + * fbcon will automatically do a set_par for us. The code below + * may not be needed. + */ + + /* there is no console on this fb... but we have to initialize hardware + * until someone tells me what is proper thing to do */ + printk(KERN_INFO "fb%d: initializing hardware\n", + ACCESS_FBINFO(fbcon.node)); + /* We have to use FB_ACTIVATE_FORCE, as we had to put vesafb_defined to the fbcon.var + * already before, so register_framebuffer works correctly. */ + vesafb_defined.activate |= FB_ACTIVATE_FORCE; + fb_set_var(&ACCESS_FBINFO(fbcon), &vesafb_defined); + return 0; failVideoIO:; matroxfb_g450_shutdown(PMINFO2); diff -puN drivers/video/matrox/matroxfb_crtc2.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/matrox/matroxfb_crtc2.c --- 25/drivers/video/matrox/matroxfb_crtc2.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/matrox/matroxfb_crtc2.c Wed Nov 3 15:18:51 2004 @@ -605,7 +605,6 @@ static int matroxfb_dh_regit(CPMINFO str m2info->fbcon.flags = FBINFO_FLAG_DEFAULT; m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN; - m2info->fbcon.currcon = -1; m2info->fbcon.pseudo_palette = m2info->cmap; fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1); @@ -634,9 +633,7 @@ static int matroxfb_dh_regit(CPMINFO str if (register_framebuffer(&m2info->fbcon)) { return -ENXIO; } - if (m2info->fbcon.currcon < 0) { - fb_set_var(&m2info->fbcon, &matroxfb_dh_defined); - } + fb_set_var(&m2info->fbcon, &matroxfb_dh_defined); down_write(&ACCESS_FBINFO(crtc2.lock)); oldcrtc2 = ACCESS_FBINFO(crtc2.info); ACCESS_FBINFO(crtc2.info) = m2info; diff -puN drivers/video/p9100.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/p9100.c --- 25/drivers/video/p9100.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/p9100.c Wed Nov 3 15:18:51 2004 @@ -307,7 +307,6 @@ static void p9100_init_one(struct sbus_d all->info.screen_base = (char *) sbus_ioremap(&sdev->resource[2], 0, all->par.fbsize, "p9100 ram"); - all->info.currcon = -1; all->info.par = &all->par; p9100_blank(0, &all->info); diff -puN drivers/video/pxafb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/pxafb.c --- 25/drivers/video/pxafb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/pxafb.c Wed Nov 3 15:18:51 2004 @@ -1043,7 +1043,6 @@ static struct pxafb_info * __init pxafb_ fbi->fb.fbops = &pxafb_ops; fbi->fb.flags = FBINFO_DEFAULT; fbi->fb.node = -1; - fbi->fb.currcon = -1; addr = fbi; addr = addr + sizeof(struct pxafb_info); diff -puN drivers/video/radeonfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/radeonfb.c --- 25/drivers/video/radeonfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/radeonfb.c Wed Nov 3 15:18:51 2004 @@ -2247,7 +2247,6 @@ static int __devinit radeon_set_fbinfo ( info = &rinfo->info; - info->currcon = -1; info->par = rinfo; info->pseudo_palette = rinfo->pseudo_palette; info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; diff -puN drivers/video/sa1100fb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/sa1100fb.c --- 25/drivers/video/sa1100fb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/sa1100fb.c Wed Nov 3 15:18:51 2004 @@ -1673,7 +1673,6 @@ static struct sa1100fb_info * __init sa1 fbi->fb.fbops = &sa1100fb_ops; fbi->fb.flags = FBINFO_DEFAULT; fbi->fb.monspecs = monspecs; - fbi->fb.currcon = -1; fbi->fb.pseudo_palette = (fbi + 1); fbi->rgb[RGB_8] = &rgb_8; diff -puN drivers/video/sis/sis_main.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/sis/sis_main.c --- 25/drivers/video/sis/sis_main.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/sis/sis_main.c Wed Nov 3 15:18:51 2004 @@ -1813,8 +1813,11 @@ sisfb_set_par(struct fb_info *info) return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) sisfb_get_fix(&info->fix, info->currcon, info); - +#else + sisfb_get_fix(&info->fix, -1, info); +#endif return 0; } diff -puN drivers/video/sstfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/sstfb.c --- 25/drivers/video/sstfb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/sstfb.c Wed Nov 3 15:18:51 2004 @@ -1471,7 +1471,6 @@ static int __devinit sstfb_probe(struct info->flags = FBINFO_DEFAULT; info->fbops = &sstfb_ops; - info->currcon = -1; info->pseudo_palette = &all->pseudo_palette; fix->type = FB_TYPE_PACKED_PIXELS; diff -puN drivers/video/stifb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/stifb.c --- 25/drivers/video/stifb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/stifb.c Wed Nov 3 15:18:51 2004 @@ -1335,7 +1335,6 @@ stifb_init_fb(struct sti_struct *sti, in info->fbops = &stifb_ops; info->screen_base = (void*) REGION_BASE(fb,1); info->flags = FBINFO_DEFAULT; - info->currcon = -1; info->pseudo_palette = &fb->pseudo_palette; /* This has to been done !!! */ diff -puN drivers/video/tcx.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/tcx.c --- 25/drivers/video/tcx.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/tcx.c Wed Nov 3 15:18:51 2004 @@ -422,7 +422,6 @@ static void tcx_init_one(struct sbus_dev all->info.screen_base = (char *) sbus_ioremap(&sdev->resource[0], 0, all->par.fbsize, "tcx ram"); - all->info.currcon = -1; all->info.par = &all->par; /* Initialize brooktree DAC. */ diff -puN drivers/video/tgafb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/tgafb.c --- 25/drivers/video/tgafb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/tgafb.c Wed Nov 3 15:18:51 2004 @@ -1430,7 +1430,6 @@ tgafb_pci_register(struct pci_dev *pdev, FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT; all->info.fbops = &tgafb_ops; all->info.screen_base = (char *) all->par.tga_fb_base; - all->info.currcon = -1; all->info.par = &all->par; all->info.pseudo_palette = all->pseudo_palette; diff -puN drivers/video/vga16fb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info drivers/video/vga16fb.c --- 25/drivers/video/vga16fb.c~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/drivers/video/vga16fb.c Wed Nov 3 15:18:51 2004 @@ -859,7 +859,6 @@ static int vga16fb_blank(int blank, stru par->vesa_blanked = 0; } if (par->palette_blanked) { - //do_install_cmap(info->currcon, info); par->palette_blanked = 0; } break; diff -puN include/linux/fb.h~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info include/linux/fb.h --- 25/include/linux/fb.h~fbcon-fbdev-remove-fbcon-specific-fields-from-struct-fb_info Wed Nov 3 15:18:51 2004 +++ 25-akpm/include/linux/fb.h Wed Nov 3 15:18:51 2004 @@ -685,7 +685,6 @@ struct fb_info { struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ struct work_struct queue; /* Framebuffer event queue */ - struct timer_list cursor_timer; /* Cursor timer */ struct fb_pixmap pixmap; /* Image hardware mapper */ struct fb_pixmap sprite; /* Cursor hardware mapper */ struct fb_cmap cmap; /* Current cmap */ @@ -697,7 +696,6 @@ struct fb_info { #endif char __iomem *screen_base; /* Virtual address */ unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */ - int currcon; /* Current VC. */ void *pseudo_palette; /* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 #define FBINFO_STATE_SUSPENDED 1 _