From: Jordan Crouse Date: Fri, 8 Dec 2006 10:40:21 +0000 (-0800) Subject: [PATCH] video: Get the default mode from the right database X-Git-Tag: MMI-PSA29.97-13-9~45897^2~92 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c25623f5540694ba70af272170d67f1411be97b1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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: Jordan Crouse Cc: Geert Uytterhoeven Cc: "Antonino A. Daplas" Signed-off-by: Tero Roponen Cc: James Simmons Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index d1267904c280..5df41f6f2b86 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -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 */ @@ -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;