From: Zhang Wei Date: Fri, 14 Mar 2008 00:45:28 +0000 (-0700) Subject: dmaengine: Fix a bug about BUG_ON() on DMA engine capability DMA_INTERRUPT. X-Git-Tag: v2.6.25-rc6~16^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9b941c6660bae673e27c207f1d20d98ef8ecd450;p=linux-2.6-omap-h63xx.git dmaengine: Fix a bug about BUG_ON() on DMA engine capability DMA_INTERRUPT. The device->device_prep_dma_interrupt function is used by DMA_INTERRUPT capability, not DMA_ZERO_SUM. Signed-off-by: Zhang Wei Acked-by: Maciej Sosnowski Signed-off-by: Dan Williams --- diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 29965231b91..8db0e7f9d3f 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -357,7 +357,7 @@ int dma_async_device_register(struct dma_device *device) !device->device_prep_dma_zero_sum); BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) && !device->device_prep_dma_memset); - BUG_ON(dma_has_cap(DMA_ZERO_SUM, device->cap_mask) && + BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) && !device->device_prep_dma_interrupt); BUG_ON(!device->device_alloc_chan_resources);