提交 c25623f5 编写于 作者: J Jordan Crouse 提交者: Linus Torvalds

[PATCH] video: Get the default mode from the right database

If no default mode is specified, it should be grabbed from the supplied
database, not the default one.

[teanropo@jyu.fi: fix it]
[akpm@osdl.org: simplify it]
[akpm@osdl.org: remove pointless DEFAULT_MODEDB_INDEX]
Signed-off-by: NJordan Crouse <jordan.crouse@amd.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: NTero Roponen <teanropo@jyu.fi>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 572c04b2
...@@ -34,8 +34,6 @@ const char *global_mode_option; ...@@ -34,8 +34,6 @@ const char *global_mode_option;
* Standard video mode definitions (taken from XFree86) * Standard video mode definitions (taken from XFree86)
*/ */
#define DEFAULT_MODEDB_INDEX 0
static const struct fb_videomode modedb[] = { static const struct fb_videomode modedb[] = {
{ {
/* 640x400 @ 70 Hz, 31.5 kHz hsync */ /* 640x400 @ 70 Hz, 31.5 kHz hsync */
...@@ -505,8 +503,10 @@ int fb_find_mode(struct fb_var_screeninfo *var, ...@@ -505,8 +503,10 @@ int fb_find_mode(struct fb_var_screeninfo *var,
db = modedb; db = modedb;
dbsize = ARRAY_SIZE(modedb); dbsize = ARRAY_SIZE(modedb);
} }
if (!default_mode) if (!default_mode)
default_mode = &modedb[DEFAULT_MODEDB_INDEX]; default_mode = &db[0];
if (!default_bpp) if (!default_bpp)
default_bpp = 8; default_bpp = 8;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册