struct or51132_state* state = (struct or51132_state*) fe->demodulator_priv; 
struct or51132_state* state = fe->demodulator_priv; 
static int or51132_read_signal_strength(struct dvb_frontend* fe, u16* strength){	struct or51132_state* state = (struct or51132_state*) fe->demodulator_priv;	unsigned char rec_buf[2];	unsigned char snd_buf[2];	u8 rcvr_stat;	u16 snr_equ;	int usK;	snd_buf[0]=0x04;	snd_buf[1]=0x02; /* SNR after Equalizer */	msleep(30); /* 30ms */	if (i2c_writebytes(state,state->config->demod_address,snd_buf,2)) {		printk(KERN_WARNING "or51132: read_status write error\n");		return -1;	}	msleep(30); /* 30ms */	if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {		printk(KERN_WARNING "or51132: read_status read error\n");		return -1;	}	snr_equ = rec_buf[0] | (rec_buf[1] << 8);	dprintk("read_signal_strength snr_equ %x %x (%i)\n",rec_buf[0],rec_buf[1],snr_equ);	/* Receiver Status */	snd_buf[0]=0x04;	snd_buf[1]=0x00;	msleep(30); /* 30ms */	if (i2c_writebytes(state,state->config->demod_address,snd_buf,2)) {		printk(KERN_WARNING "or51132: read_signal_strength read_status write error\n");		return -1;	}	msleep(30); /* 30ms */	if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {		printk(KERN_WARNING "or51132: read_signal_strength read_status read error\n");		return -1;	}	dprintk("read_signal_strength read_status %x %x\n",rec_buf[0],rec_buf[1]);	rcvr_stat = rec_buf[1];	usK = (rcvr_stat & 0x10) ? 3 : 0;        /* The value reported back from the frontend will be FFFF=100% 0000=0% */	*strength = (((8952 - i20Log10(snr_equ) - usK*100)/3+5)*65535)/1000;	dprintk("read_signal_strength %i\n",*strength);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b8742700f13163ffa00cddce2a3c940b9ab2ab5a/or51132.c/clean/drivers/media/dvb/frontends/or51132.c