int line_length, vidmem, mode_valid = 0; 
int line_length, vidmem, mode_valid = 0, retval = 0; 
static int i810_check_params(struct fb_var_screeninfo *var, 			     struct fb_info *info){	struct i810fb_par *par = (struct i810fb_par *) info->par;	int line_length, vidmem, mode_valid = 0;	u32 vyres = var->yres_virtual, vxres = var->xres_virtual;	/*	 *  Memory limit	 */	line_length = get_line_length(par, vxres, var->bits_per_pixel);	vidmem = line_length*vyres;	if (vidmem > par->fb.size) {		vyres = par->fb.size/line_length;		if (vyres < var->yres) {			vyres = yres;			vxres = par->fb.size/vyres;			vxres /= var->bits_per_pixel >> 3;			line_length = get_line_length(par, vxres, 						      var->bits_per_pixel);			vidmem = line_length * yres;			if (vxres < var->xres) {				printk("i810fb: required video memory, "				       "%d bytes, for %dx%d-%d (virtual) "				       "is out of range\n", 				       vidmem, vxres, vyres, 				       var->bits_per_pixel);				return -ENOMEM;			}		}	}	var->xres_virtual = vxres;	var->yres_virtual = vyres;	/*	 * Monitor limit	 */	switch (var->bits_per_pixel) {	case 8:		info->monspecs.dclkmax = 234000000;		break;	case 16:		info->monspecs.dclkmax = 229000000;		break;	case 24:	case 32:		info->monspecs.dclkmax = 204000000;		break;	}	info->monspecs.dclkmin = 15000000;	if (!fb_validate_mode(var, info))		mode_valid = 1;#ifdef CONFIG_FB_I810_I2C	if (!mode_valid && info->monspecs.gtf &&	    !fb_get_mode(FB_MAXTIMINGS, 0, var, info))		mode_valid = 1;	if (!mode_valid && info->monspecs.modedb_len) {		struct fb_videomode *mode;		mode = fb_find_best_mode(var, &info->modelist);		if (mode) {			fb_videomode_to_var(var, mode);			mode_valid = 1;		}	}#endif	if (!mode_valid && info->monspecs.modedb_len == 0) {		if (fb_get_mode(FB_MAXTIMINGS, 0, var, info)) {			int default_sync = (info->monspecs.hfmin-HFMIN)				|(info->monspecs.hfmax-HFMAX)				|(info->monspecs.vfmin-VFMIN)				|(info->monspecs.vfmax-VFMAX);			printk("i810fb: invalid video mode%s\n",			       default_sync ? "" : ". Specifying "			       "vsyncN/hsyncN parameters may help");		}	}	return 0;}	
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/883f64510718e7df9abbfeec4748d92745d8cc3e/i810_main.c/buggy/drivers/video/i810/i810_main.c