y_diff = info->var.yres - var.yres;
        if (x_diff < 0 || x_diff > virt_fw ||
            y_diff < 0 || y_diff > virt_fh) {
-               struct fb_videomode *mode;
+               const struct fb_videomode *mode;
 
                DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
                mode = fb_find_best_mode(&var, &info->modelist);
        int i;
        struct vc_data *vc;
        struct fb_var_screeninfo var;
-       struct fb_videomode *mode;
+       const struct fb_videomode *mode;
 
        for (i = first_fb_vc; i <= last_fb_vc; i++) {
                if (registered_fb[con2fb_map[i]] != info)
 
     struct fb_bitfield green;
     struct fb_bitfield blue;
     struct fb_bitfield transp;
-    struct fb_videomode *mode;
+    const struct fb_videomode *mode;
 };
 
 struct fbcon_ops {
 
 
        acquire_console_sem();
        list_splice(&fb_info->modelist, &old_list);
-       fb_videomode_to_modelist((struct fb_videomode *)buf, i,
+       fb_videomode_to_modelist((const struct fb_videomode *)buf, i,
                                 &fb_info->modelist);
        if (fb_new_modelist(fb_info)) {
                fb_destroy_modelist(&fb_info->modelist);
 
                mode_valid = 1;
 
        if (!mode_valid && info->monspecs.modedb_len) {
-               struct fb_videomode *mode;
+               const struct fb_videomode *mode;
 
                mode = fb_find_best_mode(var, &info->modelist);
                if (mode) {
        fb_videomode_to_modelist(specs->modedb, specs->modedb_len,
                                 &info->modelist);
        if (specs->modedb != NULL) {
-               struct fb_videomode *m;
+               const struct fb_videomode *m;
 
                if (xres && yres) {
                        if ((m = fb_find_best_mode(&var, &info->modelist))) {
 
  * @var: pointer to struct fb_var_screeninfo
  */
 void fb_var_to_videomode(struct fb_videomode *mode,
-                        struct fb_var_screeninfo *var)
+                        const struct fb_var_screeninfo *var)
 {
        u32 pixclock, hfreq, htotal, vtotal;
 
  * @mode: pointer to struct fb_videomode
  */
 void fb_videomode_to_var(struct fb_var_screeninfo *var,
-                              struct fb_videomode *mode)
+                        const struct fb_videomode *mode)
 {
        var->xres = mode->xres;
        var->yres = mode->yres;
  * RETURNS:
  * 1 if equal, 0 if not
  */
-int fb_mode_is_equal(struct fb_videomode *mode1,
-                    struct fb_videomode *mode2)
+int fb_mode_is_equal(const struct fb_videomode *mode1,
+                    const struct fb_videomode *mode2)
 {
        return (mode1->xres         == mode2->xres &&
                mode1->yres         == mode2->yres &&
  * var->xres and var->yres.  If more than 1 videomode is found, will return
  * the videomode with the highest refresh rate
  */
-struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var,
-                                      struct list_head *head)
+const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
+                                            struct list_head *head)
 {
        struct list_head *pos;
        struct fb_modelist *modelist;
  * If more than 1 videomode is found, will return the videomode with
  * the closest refresh rate.
  */
-struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode,
-                                         struct list_head *head)
+const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
+                                               struct list_head *head)
 {
        struct list_head *pos;
        struct fb_modelist *modelist;
  * RETURNS:
  * struct fb_videomode, NULL if none found
  */
-struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var,
-                                  struct list_head *head)
+const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
+                                        struct list_head *head)
 {
        struct list_head *pos;
        struct fb_modelist *modelist;
  * NOTES:
  * Will only add unmatched mode entries
  */
-int fb_add_videomode(struct fb_videomode *mode, struct list_head *head)
+int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head)
 {
        struct list_head *pos;
        struct fb_modelist *modelist;
  * NOTES:
  * Will remove all matching mode entries
  */
-void fb_delete_videomode(struct fb_videomode *mode, struct list_head *head)
+void fb_delete_videomode(const struct fb_videomode *mode,
+                        struct list_head *head)
 {
        struct list_head *pos, *n;
        struct fb_modelist *modelist;
  * @num: number of entries in array
  * @head: struct list_head of modelist
  */
-void fb_videomode_to_modelist(struct fb_videomode *modedb, int num,
+void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
                              struct list_head *head)
 {
        int i;
        }
 }
 
-struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs,
-                                         struct list_head *head)
+const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
+                                               struct list_head *head)
 {
        struct list_head *pos;
        struct fb_modelist *modelist;
-       struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL;
+       const struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL;
        int first = 0;
 
        if (!head->prev || !head->next || list_empty(head))
 
        }
 
        if (!mode_valid) {
-               struct fb_videomode *mode;
+               const struct fb_videomode *mode;
 
                mode = fb_find_best_mode(var, &info->modelist);
                if (mode) {
        }
 
        if (specs->modedb != NULL) {
-               struct fb_videomode *modedb;
+               const struct fb_videomode *mode;
 
-               modedb = fb_find_best_display(specs, &info->modelist);
-               fb_videomode_to_var(&nvidiafb_default_var, modedb);
+               mode = fb_find_best_display(specs, &info->modelist);
+               fb_videomode_to_var(&nvidiafb_default_var, mode);
                nvidiafb_default_var.bits_per_pixel = bpp;
        } else if (par->fpWidth && par->fpHeight) {
                char buf[16];
 
        return rc;
 }
 
-static void riva_update_var(struct fb_var_screeninfo *var, struct fb_videomode *modedb)
+static void riva_update_var(struct fb_var_screeninfo *var,
+                           const struct fb_videomode *modedb)
 {
        NVTRACE_ENTER();
        var->xres = var->xres_virtual = modedb->xres;
 
 static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
 {
-       struct fb_videomode *mode;
+       const struct fb_videomode *mode;
        struct riva_par *par = info->par;
        int nom, den;           /* translating from pixels->bytes */
        int mode_valid = 0;
 
        vga_out8(0x3d5, cr66, par);
 }
 
-static void savage_update_var(struct fb_var_screeninfo *var, struct fb_videomode *modedb)
+static void savage_update_var(struct fb_var_screeninfo *var,
+                             const struct fb_videomode *modedb)
 {
        var->xres = var->xres_virtual = modedb->xres;
        var->yres = modedb->yres;
        }
 
        if (!mode_valid) {
-               struct fb_videomode *mode;
+               const struct fb_videomode *mode;
 
                mode = fb_find_best_mode(var, &info->modelist);
                if (mode) {
                             info->monspecs.modedb, info->monspecs.modedb_len,
                             NULL, 8);
        } else if (info->monspecs.modedb != NULL) {
-               struct fb_videomode *modedb;
+               const struct fb_videomode *mode;
 
-               modedb = fb_find_best_display(&info->monspecs,
-                                             &info->modelist);
-               savage_update_var(&info->var, modedb);
+               mode = fb_find_best_display(&info->monspecs, &info->modelist);
+               savage_update_var(&info->var, mode);
        }
 
        /* maximize virtual vertical length */
 
 /* drivers/video/modedb.c */
 #define VESA_MODEDB_SIZE 34
 extern void fb_var_to_videomode(struct fb_videomode *mode,
-                               struct fb_var_screeninfo *var);
+                               const struct fb_var_screeninfo *var);
 extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
-                               struct fb_videomode *mode);
-extern int fb_mode_is_equal(struct fb_videomode *mode1,
-                           struct fb_videomode *mode2);
-extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head);
-extern void fb_delete_videomode(struct fb_videomode *mode,
+                               const struct fb_videomode *mode);
+extern int fb_mode_is_equal(const struct fb_videomode *mode1,
+                           const struct fb_videomode *mode2);
+extern int fb_add_videomode(const struct fb_videomode *mode,
+                           struct list_head *head);
+extern void fb_delete_videomode(const struct fb_videomode *mode,
                                struct list_head *head);
-extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var,
-                                         struct list_head *head);
-extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var,
-                                             struct list_head *head);
-extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode,
-                                                struct list_head *head);
+extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
+                                               struct list_head *head);
+extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
+                                                   struct list_head *head);
+extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
+                                                      struct list_head *head);
 extern void fb_destroy_modelist(struct list_head *head);
-extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num,
+extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
                                     struct list_head *head);
-extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs,
-                                                struct list_head *head);
+extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
+                                                      struct list_head *head);
 
 /* drivers/video/fbcmap.c */
 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);