struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv; 
struct nxt2002_state* state = fe->demodulator_priv; 
static int nxt2002_load_firmware (struct dvb_frontend* fe, const struct firmware *fw){	struct nxt2002_state* state = (struct nxt2002_state*) fe->demodulator_priv;	u8 buf[256],written = 0,chunkpos = 0;	u16 rambase,position,crc = 0;	dprintk("%s\n", __FUNCTION__);	dprintk("Firmware is %zu bytes\n",fw->size);	/* Get the RAM base for this nxt2002 */	i2c_readbytes(state,0x10,buf,1);	if (buf[0] & 0x10)		rambase = 0x1000;	else		rambase = 0x0000;	dprintk("rambase on this nxt2002 is %04X\n",rambase);	/* Hold the micro in reset while loading firmware */	buf[0] = 0x80;	i2c_writebytes(state,0x2B,buf,1);	for (position = 0; position < fw->size ; position++) {		if (written == 0) {			crc = 0;			chunkpos = 0x28;			buf[0] = ((rambase + position) >> 8);			buf[1] = (rambase + position) & 0xFF;			buf[2] = 0x81;			/* write starting address */			i2c_writebytes(state,0x29,buf,3);		}		written++;		chunkpos++;		if ((written % 4) == 0)			i2c_writebytes(state,chunkpos,&fw->data[position-3],4);		crc = nxt2002_crc(crc,fw->data[position]);		if ((written == 255) || (position+1 == fw->size)) {			/* write remaining bytes of firmware */			i2c_writebytes(state, chunkpos+4-(written %4),				&fw->data[position-(written %4) + 1],				written %4);			buf[0] = crc << 8;			buf[1] = crc & 0xFF;			/* write crc */			i2c_writebytes(state,0x2C,buf,2);			/* do a read to stop things */			i2c_readbytes(state,0x2A,buf,1);			/* set transfer mode to complete */			buf[0] = 0x80;			i2c_writebytes(state,0x2B,buf,1);			written = 0;		}	}	printk ("done.\n");	return 0;};
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b8742700f13163ffa00cddce2a3c940b9ab2ab5a/nxt2002.c/clean/drivers/media/dvb/frontends/nxt2002.c