div = (1000 * (frq * 4 / 16 - 700 - 225) + 16384) >> 15; 
div = ((frq * 4000 / 16 - 700000 - 225000) + 16384) >> 15; 
static void set_radio_freq(struct i2c_client *c, unsigned int frq){	struct tuner *t = i2c_get_clientdata(c);	unsigned char buffer[5];	unsigned div;	int rc;	tuner_dbg (PREFIX "radio freq counter %d\n", frq);	/* Rounds freq to next decimal value - for 62.5 KHz step */	/* frq = 20*(frq/16)+radio_frq[frq%16]; */	buffer[2] = TEA5767_PORT1_HIGH;	buffer[3] = TEA5767_PORT2_HIGH | TEA5767_HIGH_CUT_CTRL |		    TEA5767_ST_NOISE_CTL | TEA5767_JAPAN_BAND;	buffer[4] = 0;	if (t->mode == T_STANDBY) {		tuner_dbg("TEA5767 set to standby mode\n");		buffer[3] |= TEA5767_STDBY;	}	if (t->audmode == V4L2_TUNER_MODE_MONO) {		tuner_dbg("TEA5767 set to mono\n");		buffer[2] |= TEA5767_MONO;	} else {		tuner_dbg("TEA5767 set to stereo\n");	}	/* Should be replaced */	switch (TEA5767_HIGH_LO_32768) {	case TEA5767_HIGH_LO_13MHz:		tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 13 MHz\n");		buffer[2] |= TEA5767_HIGH_LO_INJECT;		buffer[4] |= TEA5767_PLLREF_ENABLE;		div = (frq * 4 / 16 + 700 + 225 + 25) / 50;		break;	case TEA5767_LOW_LO_13MHz:		tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 13 MHz\n");		buffer[4] |= TEA5767_PLLREF_ENABLE;		div = (frq * 4 / 16 - 700 - 225 + 25) / 50;		break;	case TEA5767_LOW_LO_32768:		tuner_dbg ("TEA5767 radio LOW LO inject xtal @ 32,768 MHz\n");		buffer[3] |= TEA5767_XTAL_32768;		/* const 700=4000*175 Khz - to adjust freq to right value */		div = (1000 * (frq * 4 / 16 - 700 - 225) + 16384) >> 15;		break;	case TEA5767_HIGH_LO_32768:	default:		tuner_dbg ("TEA5767 radio HIGH LO inject xtal @ 32,768 MHz\n");		buffer[2] |= TEA5767_HIGH_LO_INJECT;		buffer[3] |= TEA5767_XTAL_32768;		div = (1000 * (frq * 4 / 16 + 700 + 225) + 16384) >> 15;		break;	}	buffer[0] = (div >> 8) & 0x3f;	buffer[1] = div & 0xff;	if (tuner_debug)		tea5767_status_dump(buffer);	if (5 != (rc = i2c_master_send(c, buffer, 5)))		tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c5287ba132ff742e595d42c28b66cbba19522c4e/tea5767.c/buggy/drivers/media/video/tea5767.c