drivers/video: fsl-diu-fb: remove redundant default video mode

The framebuffer layer already uses the first video mode defined in the
fb_videomode array as a default, so there's no need to duplicate the
first entry into a stand-alone structure.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
This commit is contained in:
Timur Tabi 2011-09-15 16:44:51 -05:00 committed by Florian Tobias Schandinat
parent 9e52ba612f
commit 63cf8df44e
1 changed files with 7 additions and 25 deletions

View File

@ -36,26 +36,10 @@
#include "edid.h" #include "edid.h"
/* /*
* These parameters give default parameters * List of supported video modes
* for video output 1024x768, *
* FIXME - change timing to proper amounts * The first entry is the default video mode
* hsync 31.5kHz, vsync 60Hz
*/ */
static struct fb_videomode __devinitdata fsl_diu_default_mode = {
.refresh = 60,
.xres = 1024,
.yres = 768,
.pixclock = 15385,
.left_margin = 160,
.right_margin = 24,
.upper_margin = 29,
.lower_margin = 3,
.hsync_len = 136,
.vsync_len = 6,
.sync = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED
};
static struct fb_videomode __devinitdata fsl_diu_mode_db[] = { static struct fb_videomode __devinitdata fsl_diu_mode_db[] = {
{ {
.name = "1024x768-60", .name = "1024x768-60",
@ -1165,8 +1149,8 @@ static int __devinit install_fb(struct fb_info *info)
} else { } else {
aoi_mode = init_aoi_mode; aoi_mode = init_aoi_mode;
} }
rc = fb_find_mode(&info->var, info, aoi_mode, db, dbsize, rc = fb_find_mode(&info->var, info, aoi_mode, db, dbsize, NULL,
&fsl_diu_default_mode, default_bpp); default_bpp);
if (!rc) { if (!rc) {
/* /*
* For plane 0 we continue and look into * For plane 0 we continue and look into
@ -1180,10 +1164,8 @@ static int __devinit install_fb(struct fb_info *info)
if (!has_default_mode) { if (!has_default_mode) {
rc = fb_find_mode(&info->var, info, aoi_mode, fsl_diu_mode_db, rc = fb_find_mode(&info->var, info, aoi_mode, fsl_diu_mode_db,
ARRAY_SIZE(fsl_diu_mode_db), ARRAY_SIZE(fsl_diu_mode_db), NULL, default_bpp);
&fsl_diu_default_mode, if (rc)
default_bpp);
if (rc > 0 && rc < 5)
has_default_mode = 1; has_default_mode = 1;
} }