chan->dev_id = dev_id; 
int omap_request_dma(int dev_id, const char *dev_name,		     void (* callback)(int lch, u16 ch_status, void *data),		     void *data, int *dma_ch_out){	int ch, free_ch = -1;	unsigned long flags;	struct omap_dma_lch *chan;	spin_lock_irqsave(&dma_chan_lock, flags);	for (ch = 0; ch < dma_chan_count; ch++) {		if (free_ch == -1 && dma_chan[ch].dev_id == -1) {			free_ch = ch;			if (dev_id == 0)				break;		}	}	if (free_ch == -1) {		spin_unlock_irqrestore(&dma_chan_lock, flags);		return -EBUSY;	}	chan = dma_chan + free_ch;	chan->dev_id = dev_id;	clear_lch_regs(free_ch);	spin_unlock_irqrestore(&dma_chan_lock, flags);	chan->dev_id = dev_id;	chan->dev_name = dev_name;	chan->callback = callback;	chan->data = data;	chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;	if (cpu_is_omap16xx()) {		/* If the sync device is set, configure it dynamically. */		if (dev_id != 0) {			set_gdma_dev(free_ch + 1, dev_id);			dev_id = free_ch + 1;		}		/* Disable the 1510 compatibility mode and set the sync device		 * id. */		omap_writew(dev_id | (1 << 10), OMAP_DMA_CCR(free_ch));	} else {		omap_writew(dev_id, OMAP_DMA_CCR(free_ch));	}	*dma_ch_out = free_ch;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1a8bfa1eb998af6e650ad26201f7cae9f2a2fdc8/dma.c/clean/arch/arm/plat-omap/dma.c