summaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb_driver.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-11-07 10:00:55 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 16:53:53 +0100
commit5ee1ef96a0d5c49809c61bdbb30cdda88e1d23cf (patch)
treedbb520ffd6c6ca8e955b1df70e89697e8b5957e7 /drivers/video/savage/savagefb_driver.c
parent[PATCH] fbdev: Add helper to get an appropriate initial mode (diff)
downloadlinux-5ee1ef96a0d5c49809c61bdbb30cdda88e1d23cf.tar.xz
linux-5ee1ef96a0d5c49809c61bdbb30cdda88e1d23cf.zip
[PATCH] fbdev: Convert a few drivers to use the fb_find_best_display helper
Convert i810fb, nvidiafb and savagefb to use the fb_find_best_display helper when searching for the initial video mode. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/savage/savagefb_driver.c')
-rw-r--r--drivers/video/savage/savagefb_driver.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 06e989ba3d13..f0dfb35e3191 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -2052,24 +2052,11 @@ static int __devinit savagefb_probe (struct pci_dev* dev,
info->monspecs.modedb, info->monspecs.modedb_len,
NULL, 8);
} else if (info->monspecs.modedb != NULL) {
- struct fb_monspecs *specs = &info->monspecs;
- struct fb_videomode modedb;
+ struct fb_videomode *modedb;
- if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
- int i;
-
- for (i = 0; i < specs->modedb_len; i++) {
- if (specs->modedb[i].flag & FB_MODE_IS_FIRST) {
- modedb = specs->modedb[i];
- break;
- }
- }
- } else {
- /* otherwise, get first mode in database */
- modedb = specs->modedb[0];
- }
-
- savage_update_var(&info->var, &modedb);
+ modedb = fb_find_best_display(&info->monspecs,
+ &info->modelist);
+ savage_update_var(&info->var, modedb);
}
/* maximize virtual vertical length */