struct mt312_state *state = (struct mt312_state*) fe->demodulator_priv; 
struct mt312_state *state = fe->demodulator_priv; 
static int mt312_initfe(struct dvb_frontend* fe){	struct mt312_state *state = (struct mt312_state*) fe->demodulator_priv;	int ret;	u8 buf[2];	/* wake up */	if ((ret = mt312_writereg(state, CONFIG, (state->frequency == 60 ? 0x88 : 0x8c))) < 0)		return ret;	/* wait at least 150 usec */	udelay(150);	/* full reset */	if ((ret = mt312_reset(state, 1)) < 0)		return ret;// Per datasheet, write correct values. 09/28/03 ACCJr.// If we don't do this, we won't get FE_HAS_VITERBI in the VP310.	{		u8 buf_def[8]={0x14, 0x12, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00};		if ((ret = mt312_write(state, VIT_SETUP, buf_def, sizeof(buf_def))) < 0)			return ret;	}	/* SYS_CLK */	buf[0] = mt312_div((state->frequency == 60 ? MT312_LPOWER_SYS_CLK : MT312_SYS_CLK) * 2, 1000000);	/* DISEQC_RATIO */	buf[1] = mt312_div(MT312_PLL_CLK, 15000 * 4);	if ((ret = mt312_write(state, SYS_CLK, buf, sizeof(buf))) < 0)		return ret;	if ((ret = mt312_writereg(state, SNR_THS_HIGH, 0x32)) < 0)		return ret;	if ((ret = mt312_writereg(state, OP_CTRL, 0x53)) < 0)		return ret;	/* TS_SW_LIM */	buf[0] = 0x8c;	buf[1] = 0x98;	if ((ret = mt312_write(state, TS_SW_LIM_L, buf, sizeof(buf))) < 0)		return ret;	if ((ret = mt312_writereg(state, CS_SW_LIM, 0x69)) < 0)		return ret;	if (state->config->pll_init) {		mt312_writereg(state, GPP_CTRL, 0x40);		state->config->pll_init(fe);		mt312_writereg(state, GPP_CTRL, 0x00);	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b8742700f13163ffa00cddce2a3c940b9ab2ab5a/mt312.c/clean/drivers/media/dvb/frontends/mt312.c