aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index a815f5e2fcb5..71b55070bdb9 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1029,6 +1029,7 @@ register_framebuffer(struct fb_info *fb_info)
1029{ 1029{
1030 int i; 1030 int i;
1031 struct fb_event event; 1031 struct fb_event event;
1032 struct fb_videomode mode;
1032 1033
1033 if (num_registered_fb == FB_MAX) 1034 if (num_registered_fb == FB_MAX)
1034 return -ENXIO; 1035 return -ENXIO;
@@ -1059,16 +1060,11 @@ register_framebuffer(struct fb_info *fb_info)
1059 } 1060 }
1060 fb_info->pixmap.offset = 0; 1061 fb_info->pixmap.offset = 0;
1061 1062
1062 if (!fb_info->modelist.prev || 1063 if (!fb_info->modelist.prev || !fb_info->modelist.next)
1063 !fb_info->modelist.next ||
1064 list_empty(&fb_info->modelist)) {
1065 struct fb_videomode mode;
1066
1067 INIT_LIST_HEAD(&fb_info->modelist); 1064 INIT_LIST_HEAD(&fb_info->modelist);
1068 fb_var_to_videomode(&mode, &fb_info->var);
1069 fb_add_videomode(&mode, &fb_info->modelist);
1070 }
1071 1065
1066 fb_var_to_videomode(&mode, &fb_info->var);
1067 fb_add_videomode(&mode, &fb_info->modelist);
1072 registered_fb[i] = fb_info; 1068 registered_fb[i] = fb_info;
1073 1069
1074 devfs_mk_cdev(MKDEV(FB_MAJOR, i), 1070 devfs_mk_cdev(MKDEV(FB_MAJOR, i),