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 <konkers@android.com>
This commit is contained in:
Erik Gilling
2010-10-14 12:44:10 -07:00
parent 0c6062a8ff
commit 3cebbf8d89

View 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;
}