Skip to content

Commit

Permalink
[PATCH] video: Get the default mode from the right database
Browse files Browse the repository at this point in the history
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: Jordan Crouse <jordan.crouse@amd.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Tero Roponen <teanropo@jyu.fi>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jordan Crouse authored and Linus Torvalds committed Dec 8, 2006
1 parent 572c04b commit c25623f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const char *global_mode_option;
* Standard video mode definitions (taken from XFree86)
*/

#define DEFAULT_MODEDB_INDEX 0

static const struct fb_videomode modedb[] = {
{
/* 640x400 @ 70 Hz, 31.5 kHz hsync */
Expand Down Expand Up @@ -505,8 +503,10 @@ int fb_find_mode(struct fb_var_screeninfo *var,
db = modedb;
dbsize = ARRAY_SIZE(modedb);
}

if (!default_mode)
default_mode = &modedb[DEFAULT_MODEDB_INDEX];
default_mode = &db[0];

if (!default_bpp)
default_bpp = 8;

Expand Down

0 comments on commit c25623f

Please sign in to comment.