hfreq = (hfreq + 500) / 1000 * 1000;  
int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info){	u32 hfreq, vfreq, htotal, vtotal, pixclock;	u32 hfmin, hfmax, vfmin, vfmax, dclkmin, dclkmax;	/* 	 * If monspecs are invalid, use values that are enough	 * for 640x480@60	 */	if (!info->monspecs.hfmax || !info->monspecs.vfmax ||	    !info->monspecs.dclkmax ||	    info->monspecs.hfmax < info->monspecs.hfmin ||	    info->monspecs.vfmax < info->monspecs.vfmin ||	    info->monspecs.dclkmax < info->monspecs.dclkmin) {		hfmin = 29000; hfmax = 30000;		vfmin = 60; vfmax = 60;		dclkmin = 0; dclkmax = 25000000;	} else {		hfmin = info->monspecs.hfmin;		hfmax = info->monspecs.hfmax;		vfmin = info->monspecs.vfmin;		vfmax = info->monspecs.vfmax;		dclkmin = info->monspecs.dclkmin;		dclkmax = info->monspecs.dclkmax;	}	if (!var->pixclock)		return -EINVAL;	pixclock = PICOS2KHZ(var->pixclock) * 1000;	   	htotal = var->xres + var->right_margin + var->hsync_len + 		var->left_margin;	vtotal = var->yres + var->lower_margin + var->vsync_len + 		var->upper_margin;	if (var->vmode & FB_VMODE_INTERLACED)		vtotal /= 2;	if (var->vmode & FB_VMODE_DOUBLE)		vtotal *= 2;	hfreq = pixclock/htotal;	vfreq = hfreq/vtotal;	return (vfreq < vfmin || vfreq > vfmax || 		hfreq < hfmin || hfreq > hfmax ||		pixclock < dclkmin || pixclock > dclkmax) ?		-EINVAL : 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0a793b77f786022bd0fef1a18142c1b9be9e421d/fbmon.c/buggy/drivers/video/fbmon.c