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

Jordan Crouse jordan.crouse at amd.unroutablecom
Sun Dec 24 04:29:31 EST 2006


Commit:     c25623f5540694ba70af272170d67f1411be97b1
Parent:     572c04b24bd7b7e4b6a684416325cc3751fa8f45
commit c25623f5540694ba70af272170d67f1411be97b1
Author:     Jordan Crouse <jordan.crouse at amd.com>
AuthorDate: Fri Dec 8 02:40:21 2006 -0800
Commit:     Linus Torvalds <torvalds at woody.osdl.org>
CommitDate: Fri Dec 8 08:29:05 2006 -0800

    [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 at jyu.fi: fix it]
    [akpm at osdl.org: simplify it]
    [akpm at osdl.org: remove pointless DEFAULT_MODEDB_INDEX]
    Signed-off-by: Jordan Crouse <jordan.crouse at amd.com>
    Cc: Geert Uytterhoeven <geert at linux-m68k.org>
    Cc: "Antonino A. Daplas" <adaplas at pol.net>
    Signed-off-by: Tero Roponen <teanropo at jyu.fi>
    Cc: James Simmons <jsimmons at infradead.org>
    Signed-off-by: Andrew Morton <akpm at osdl.org>
    Signed-off-by: Linus Torvalds <torvalds at osdl.org>
---
 drivers/video/modedb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d126790..5df41f6 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_screeninf
 	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;
 


More information about the Commits-kernel mailing list