video: modedb: make fb_add_videomode keep modelist in order added
authorErik Gilling <konkers@android.com>
Thu, 14 Oct 2010 19:44:10 +0000 (12:44 -0700)
committerErik Gilling <konkers@android.com>
Mon, 18 Oct 2010 19:06:36 +0000 (12:06 -0700)
This makes the default case in fb_find_best_display ("last resort, use
the very first mode") actually use the first mode added.

Change-Id: Ia43ac4a4251522cd30c0da514da23e47b2906e2c
Signed-off-by: Erik Gilling <konkers@android.com>
drivers/video/modedb.c

index 0a4dbdc1693a4462bddb82cdf5e0b9ab5ec4bed2..cf68c0ba8d1bad5e2da826dc16c23c878d68b40a 100644 (file)
@@ -923,7 +923,7 @@ int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head)
                if (!modelist)
                        return -ENOMEM;
                modelist->mode = *mode;
-               list_add(&modelist->list, head);
+               list_add_tail(&modelist->list, head);
        }
        return 0;
 }