struct i2c_msg tuner_msg = {.addr = 0x63,.flags = 0,.buf = tuner_buf,.len = sizeof(tuner_buf) }; 
struct i2c_msg tuner_msg = {.addr = budget_ci->tuner_pll_address,.flags = 0,.buf = tuner_buf,.len = sizeof(tuner_buf) }; 
static int philips_tdm1316l_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params){	struct budget_ci *budget_ci = (struct budget_ci *) fe->dvb->priv;	u8 tuner_buf[4];	struct i2c_msg tuner_msg = {.addr = 0x63,.flags = 0,.buf = tuner_buf,.len = sizeof(tuner_buf) };	int tuner_frequency = 0;	u8 band, cp, filter;	// determine charge pump	tuner_frequency = params->frequency + 36130000;	if (tuner_frequency < 87000000)		return -EINVAL;	else if (tuner_frequency < 130000000)		cp = 3;	else if (tuner_frequency < 160000000)		cp = 5;	else if (tuner_frequency < 200000000)		cp = 6;	else if (tuner_frequency < 290000000)		cp = 3;	else if (tuner_frequency < 420000000)		cp = 5;	else if (tuner_frequency < 480000000)		cp = 6;	else if (tuner_frequency < 620000000)		cp = 3;	else if (tuner_frequency < 830000000)		cp = 5;	else if (tuner_frequency < 895000000)		cp = 7;	else		return -EINVAL;	// determine band	if (params->frequency < 49000000)		return -EINVAL;	else if (params->frequency < 159000000)		band = 1;	else if (params->frequency < 444000000)		band = 2;	else if (params->frequency < 861000000)		band = 4;	else		return -EINVAL;	// setup PLL filter and TDA9889	switch (params->u.ofdm.bandwidth) {	case BANDWIDTH_6_MHZ:		tda1004x_write_byte(fe, 0x0C, 0x14);		filter = 0;		break;	case BANDWIDTH_7_MHZ:		tda1004x_write_byte(fe, 0x0C, 0x80);		filter = 0;		break;	case BANDWIDTH_8_MHZ:		tda1004x_write_byte(fe, 0x0C, 0x14);		filter = 1;		break;	default:		return -EINVAL;	}	// calculate divisor	// ((36130000+((1000000/6)/2)) + Finput)/(1000000/6)	tuner_frequency = (((params->frequency / 1000) * 6) + 217280) / 1000;	// setup tuner buffer	tuner_buf[0] = tuner_frequency >> 8;	tuner_buf[1] = tuner_frequency & 0xff;	tuner_buf[2] = 0xca;	tuner_buf[3] = (cp << 5) | (filter << 3) | band;	if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)		return -EIO;	msleep(1);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/dd2bbb179326d23577ff8201c4f20e0db3e87f7b/budget-ci.c/buggy/drivers/media/dvb/ttpci/budget-ci.c