/* read status */ nxt200x_readbytes(state, 0x21, &buf, 1);  if (buf == 0) { /* read the actual data */ for(i = 0; i < len; i++) { nxt200x_readbytes(state, 0x36 + i, &data[i], 1); } return 0; 
/* read the actual data */ for(i = 0; i < len; i++) { nxt200x_readbytes(state, 0x36 + i, &data[i], 1); 
static int nxt200x_readreg_multibyte (struct nxt200x_state* state, u8 reg, u8* data, u8 len){	int i;	u8 buf, len2, attr;	dprintk("%s\n", __FUNCTION__);	/* set mutli register register */	nxt200x_writebytes(state, 0x35, &reg, 1);	switch (state->demod_chip) {		case NXT2002:			/* set multi register length */			len2 = len & 0x80;			nxt200x_writebytes(state, 0x34, &len2, 1);			/* read the actual data */			nxt200x_readbytes(state, reg, data, len);			return 0;			break;		case NXT2004:			/* probably not right, but gives correct values */			attr = 0x02;			if (reg & 0x80) {				attr = attr << 1;				if (reg & 0x04)					attr = attr >> 1;			}			/* set multi register length */			len2 = (attr << 4) | len;			nxt200x_writebytes(state, 0x34, &len2, 1);			/* toggle the multireg bit*/			buf = 0x80;			nxt200x_writebytes(state, 0x21, &buf, 1);			/* read status */			nxt200x_readbytes(state, 0x21, &buf, 1);			if (buf == 0)			{				/* read the actual data */				for(i = 0; i < len; i++) {                    nxt200x_readbytes(state, 0x36 + i, &data[i], 1);				}				return 0;			}			break;		default:			return -EINVAL;			break;	}	printk(KERN_WARNING "nxt200x: Error reading multireg register 0x%02X\n",reg);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f93cf038d5930810e7e280e70de6e0c07ad959da/nxt200x.c/buggy/drivers/media/dvb/frontends/nxt200x.c