var->xoffset = up(var->xoffset, 2);
}
par->hw.falcon.line_offset = bpp *
- (fb_display[fb_info.currcon].var.xres_virtual - fb_display[currcon].var.xres) / 16;
+ (fb_display[fb_info.currcon].var.xres_virtual - fb_display[fb_info.currcon].var.xres) / 16;
if (par->hw.falcon.xoffset)
par->hw.falcon.line_offset -= bpp;
xoffset = var->xoffset - par->hw.falcon.xoffset;
if (!options || !*options)
return 0;
-
- for(this_opt=strtok(options,","); this_opt; this_opt=strtok(NULL,",")) {
+
+ while ((this_opt = strsep(options, ",")) != NULL) {
if (!*this_opt) continue;
if ((temp=get_video_mode(this_opt)))
default_par=temp;
/*
* Set a single color register. Return != 0 for invalid regno.
*/
-static int neo_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
- u_int transp, struct fb_info *fb)
+static int neofb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ u_int transp, struct fb_info *fb)
{
struct neofb_info *info = (struct neofb_info *)fb;
neoLock();
}
-/*
- * Set the Colormap
- */
-static int neofb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *fb)
-{
- struct neofb_info *info = (struct neofb_info *)fb;
- struct display* disp = (con < 0) ? fb->disp : (fb_display + con);
- struct fb_cmap *dcmap = &disp->cmap;
- int err = 0;
-
- /* no colormap allocated? */
- if (!dcmap->len)
- {
- int size;
-
- if (fb->var.bits_per_pixel == 8)
- size = NR_PALETTE;
- else
- size = 32;
-
- err = fb_alloc_cmap (dcmap, size, 0);
- }
-
- /*
- * we should be able to remove this test once fbcon has been
- * "improved" --rmk
- */
- if (!err && con == info->fb.currcon)
- {
- err = fb_set_cmap (cmap, kspc, neo_setcolreg, fb);
- dcmap = &fb->cmap;
- }
-
- if (!err)
- fb_copy_cmap (cmap, dcmap, kspc ? 0 : 1);
-
- return err;
-}
-
/*
* neoCalcVCLK --
*
neofb_set_par (info, &par);
neofb_update_start (info, var);
- fb_set_cmap (&fb->cmap, 1, neo_setcolreg, fb);
+ fb_set_cmap (&fb->cmap, 1, fb);
if (var->accel_flags & FB_ACCELF_TEXT)
neo2200_accel_init (info, var);
/*
* (Un)Blank the display.
*/
-static void neofb_blank (int blank, struct fb_info *fb)
+static int neofb_blank (int blank, struct fb_info *fb)
{
// struct neofb_info *info = (struct neofb_info *)fb;
default: /* case 0, or anything else: unblank */
break;
}
-}
-
-/*
- * Get the currently displayed virtual consoles colormap.
- */
-static int gen_get_cmap (struct fb_cmap *cmap, int kspc, int con, struct fb_info *fb)
-{
- fb_copy_cmap (&fb->cmap, cmap, kspc ? 0 : 2);
- return 0;
-}
-
-/*
- * Get the currently displayed virtual consoles fixed part of the display.
- */
-static int gen_get_fix (struct fb_fix_screeninfo *fix, int con, struct fb_info *fb)
-{
- *fix = fb->fix;
- return 0;
-}
-
-/*
- * Get the current user defined part of the display.
- */
-static int gen_get_var (struct fb_var_screeninfo *var, int con, struct fb_info *fb)
-{
- *var = fb->var;
- return 0;
+ return 0;
}
static struct fb_ops neofb_ops = {
owner: THIS_MODULE,
fb_set_var: neofb_set_var,
- fb_set_cmap: neofb_set_cmap,
+ fb_set_cmap: gen_set_cmap,
+ fb_setcolreg: neofb_setcolreg,
fb_pan_display: neofb_pan_display,
+ fb_blank: neofb_blank,
fb_get_fix: gen_get_fix,
fb_get_var: gen_get_var,
fb_get_cmap: gen_get_cmap,
info->fb.changevar = NULL;
info->fb.switch_con = neofb_switch;
info->fb.updatevar = neofb_updatevar;
- info->fb.blank = neofb_blank;
info->fb.flags = FBINFO_FLAG_DEFAULT;
info->fb.disp = (struct display *)(info + 1);
info->fb.pseudo_palette = (void *)(info->fb.disp + 1);