struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 
struct nxt2002_state* state = fe->demodulator_priv; 
static int nxt2002_init(struct dvb_frontend* fe){	struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv;	const struct firmware *fw;	int ret;	u8 buf[2];	if (!state->initialised) {		/* request the firmware, this will block until someone uploads it */		printk("nxt2002: Waiting for firmware upload (%s)...\n", NXT2002_DEFAULT_FIRMWARE);		ret = state->config->request_firmware(fe, &fw, NXT2002_DEFAULT_FIRMWARE);		printk("nxt2002: Waiting for firmware upload(2)...\n");		if (ret) {			printk("nxt2002: no firmware upload (timeout or file not found?)\n");			return ret;		}		ret = nxt2002_load_firmware(fe, fw);		if (ret) {			printk("nxt2002: writing firmware to device failed\n");			release_firmware(fw);			return ret;		}		printk("nxt2002: firmware upload complete\n");		/* Put the micro into reset */		nxt2002_microcontroller_stop(state);		/* ensure transfer is complete */		buf[0]=0;		i2c_writebytes(state,0x2B,buf,1);		/* Put the micro into reset for real this time */		nxt2002_microcontroller_stop(state);		/* soft reset everything (agc,frontend,eq,fec)*/		buf[0] = 0x0F;		i2c_writebytes(state,0x08,buf,1);		buf[0] = 0x00;		i2c_writebytes(state,0x08,buf,1);		/* write agc sdm configure */		buf[0] = 0xF1;		i2c_writebytes(state,0x57,buf,1);		/* write mod output format */		buf[0] = 0x20;		i2c_writebytes(state,0x09,buf,1);		/* write fec mpeg mode */		buf[0] = 0x7E;		buf[1] = 0x00;		i2c_writebytes(state,0xE9,buf,2);		/* write mux selection */		buf[0] = 0x00;		i2c_writebytes(state,0xCC,buf,1);		state->initialised = 1;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b8742700f13163ffa00cddce2a3c940b9ab2ab5a/nxt2002.c/clean/drivers/media/dvb/frontends/nxt2002.c