From 3cebbf8d893ff02d83e17bd646ed931066c8569d Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Thu, 14 Oct 2010 12:44:10 -0700 Subject: [PATCH] video: modedb: make fb_add_videomode keep modelist in order added 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 --- drivers/video/modedb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 0a4dbdc1693a..cf68c0ba8d1b 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -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; } -- 2.34.1