*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset); todo -= (sg_dma_len(sg)-offset); offset = 0; sg++; while (todo > sg_dma_len(sg)) { *(rp++)=cpu_to_le32(RISC_WRITE| 
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset); todo -= (sg_dma_len(sg)-offset); offset = 0; sg++; while (todo > sg_dma_len(sg)) { *(rp++)=cpu_to_le32(RISC_WRITE| 
static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist,			    unsigned int offset, u32 sync_line,			    unsigned int bpl, unsigned int padding,			    unsigned int lines){	struct scatterlist *sg;	unsigned int line,todo;	/* sync instruction */	if (sync_line != NO_SYNC_LINE)		*(rp++) = cpu_to_le32(RISC_RESYNC | sync_line);	/* scan lines */	sg = sglist;	for (line = 0; line < lines; line++) {		while (offset && offset >= sg_dma_len(sg)) {			offset -= sg_dma_len(sg);			sg++;		}		if (bpl <= sg_dma_len(sg)-offset) {			/* fits into current chunk */                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|RISC_EOL|bpl);                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);                        offset+=bpl;		} else {			/* scanline needs to be splitted */                        todo = bpl;                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|					    (sg_dma_len(sg)-offset));                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);                        todo -= (sg_dma_len(sg)-offset);                        offset = 0;                        sg++;                        while (todo > sg_dma_len(sg)) {                                *(rp++)=cpu_to_le32(RISC_WRITE|						    sg_dma_len(sg));                                *(rp++)=cpu_to_le32(sg_dma_address(sg));				todo -= sg_dma_len(sg);				sg++;			}                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_EOL|todo);			*(rp++)=cpu_to_le32(sg_dma_address(sg));			offset += todo;		}		offset += padding;	}	return rp;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/cx88-core.c/clean/drivers/media/video/cx88/cx88-core.c