diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-11-07 04:00:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:53 -0500 |
commit | 5ee1ef96a0d5c49809c61bdbb30cdda88e1d23cf (patch) | |
tree | dbb520ffd6c6ca8e955b1df70e89697e8b5957e7 /drivers/video/i810/i810_main.c | |
parent | 003cfc0c56977f1c3ce48ddfd2073b7c6d75a5d8 (diff) |
[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/i810/i810_main.c')
-rw-r--r-- | drivers/video/i810/i810_main.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 4175b2d8513c..1d148c5a5a4b 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -1871,27 +1871,18 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info) | |||
1871 | fb_videomode_to_modelist(specs->modedb, specs->modedb_len, | 1871 | fb_videomode_to_modelist(specs->modedb, specs->modedb_len, |
1872 | &info->modelist); | 1872 | &info->modelist); |
1873 | if (specs->modedb != NULL) { | 1873 | if (specs->modedb != NULL) { |
1874 | if (xres && yres) { | 1874 | struct fb_videomode *m; |
1875 | struct fb_videomode *m; | ||
1876 | 1875 | ||
1876 | if (xres && yres) { | ||
1877 | if ((m = fb_find_best_mode(&var, &info->modelist))) { | 1877 | if ((m = fb_find_best_mode(&var, &info->modelist))) { |
1878 | mode = *m; | 1878 | mode = *m; |
1879 | found = 1; | 1879 | found = 1; |
1880 | } | 1880 | } |
1881 | } | 1881 | } |
1882 | 1882 | ||
1883 | if (!found && specs->misc & FB_MISC_1ST_DETAIL) { | ||
1884 | for (i = 0; i < specs->modedb_len; i++) { | ||
1885 | if (specs->modedb[i].flag & FB_MODE_IS_FIRST) { | ||
1886 | mode = specs->modedb[i]; | ||
1887 | found = 1; | ||
1888 | break; | ||
1889 | } | ||
1890 | } | ||
1891 | } | ||
1892 | |||
1893 | if (!found) { | 1883 | if (!found) { |
1894 | mode = specs->modedb[0]; | 1884 | m = fb_find_best_display(&info->monspecs, &info->modelist); |
1885 | mode = *m; | ||
1895 | found = 1; | 1886 | found = 1; |
1896 | } | 1887 | } |
1897 | 1888 | ||