static int dst_write_tuna(struct dvb_frontend* fe){	struct dst_state* state = (struct dst_state*) fe->demodulator_priv;	int retval;	u8 reply;	dprintk("%s: type_flags 0x%x \n", __FUNCTION__, state->type_flags);	state->decode_freq = 0;	state->decode_lock = state->decode_strength = state->decode_snr = 0;	if (state->dst_type == DST_TYPE_IS_SAT) {		if (!(state->diseq_flags & HAS_POWER))			dst_set_voltage(fe, SEC_VOLTAGE_13);	}	state->diseq_flags &= ~(HAS_LOCK | ATTEMPT_TUNE);	dst_i2c_enable(state);	if (state->type_flags & DST_TYPE_HAS_NEWTUNE) {		dst_reset8820(state);		state->tx_tuna[9] = dst_check_sum(&state->tx_tuna[0], 9);		retval = write_dst(state, &state->tx_tuna[0], 10);	} else {		state->tx_tuna[9] = dst_check_sum(&state->tx_tuna[2], 7);		retval = write_dst(state, &state->tx_tuna[2], 8);	}	if (retval < 0) {		dst_i2c_disable(state);		dprintk("%s: write not successful\n", __FUNCTION__);		return retval;	}	msleep(3);	retval = read_dst(state, &reply, 1);	dst_i2c_disable(state);	if (retval < 0) {		dprintk("%s: read verify  not successful\n", __FUNCTION__);		return retval;	}	if (reply != 0xff) {		dprintk("%s: write reply not 0xff 0x%02x \n", __FUNCTION__, reply);		return 0;	}	state->diseq_flags |= ATTEMPT_TUNE;	return dst_get_tuna(state);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/50b215a05878ce9636dace6cd21f7e91ff005058/dst.c/clean/drivers/media/dvb/bt8xx/dst.c