printk(KERN_ERR "unable to request IRQ for LCD DMA (error %d)\n", r); for (i = 0; i < dma_chan_count; i++) free_irq(dma_irq[i], (void *) (i + 1)); return r; } 
static int __init omap_init_dma(void){	int ch, r;	if (cpu_is_omap1510()) {		printk(KERN_INFO "DMA support for OMAP1510 initialized\n");		dma_chan_count = 9;		enable_1510_mode = 1;	} else if (cpu_is_omap16xx() || cpu_is_omap730()) {		printk(KERN_INFO "OMAP DMA hardware version %d\n",		       omap_readw(OMAP_DMA_HW_ID));		printk(KERN_INFO "DMA capabilities: %08x:%08x:%04x:%04x:%04x\n",		       (omap_readw(OMAP_DMA_CAPS_0_U) << 16) | omap_readw(OMAP_DMA_CAPS_0_L),		       (omap_readw(OMAP_DMA_CAPS_1_U) << 16) | omap_readw(OMAP_DMA_CAPS_1_L),		       omap_readw(OMAP_DMA_CAPS_2), omap_readw(OMAP_DMA_CAPS_3),		       omap_readw(OMAP_DMA_CAPS_4));		if (!enable_1510_mode) {			u16 w;			/* Disable OMAP 3.0/3.1 compatibility mode. */			w = omap_readw(OMAP_DMA_GSCR);			w |= 1 << 3;			omap_writew(w, OMAP_DMA_GSCR);			dma_chan_count = 16;		} else			dma_chan_count = 9;	} else {		dma_chan_count = 0;		return 0;	}	memset(&lcd_dma, 0, sizeof(lcd_dma));	spin_lock_init(&lcd_dma.lock);	spin_lock_init(&dma_chan_lock);	memset(&dma_chan, 0, sizeof(dma_chan));	for (ch = 0; ch < dma_chan_count; ch++) {		dma_chan[ch].dev_id = -1;		dma_chan[ch].next_lch = -1;		if (ch >= 6 && enable_1510_mode)			continue;		/* request_irq() doesn't like dev_id (ie. ch) being zero,		 * so we have to kludge around this. */		r = request_irq(dma_irq[ch], dma_irq_handler, 0, "DMA",				(void *) (ch + 1));		if (r != 0) {			int i;			printk(KERN_ERR "unable to request IRQ %d for DMA (error %d)\n",			       dma_irq[ch], r);			for (i = 0; i < ch; i++)				free_irq(dma_irq[i], (void *) (i + 1));			return r;		}	}	r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, "LCD DMA", NULL);	if (r != 0) {		int i;		printk(KERN_ERR "unable to request IRQ for LCD DMA (error %d)\n", r);		for (i = 0; i < dma_chan_count; i++)			free_irq(dma_irq[i], (void *) (i + 1));		return r;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1a8bfa1eb998af6e650ad26201f7cae9f2a2fdc8/dma.c/clean/arch/arm/plat-omap/dma.c