From: H Hartley Sweeten Date: Fri, 22 Mar 2013 16:55:54 +0000 (-0700) Subject: staging: comedi: ni_labpc: dma requires an interrupt X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=290899082a4214b16537be64a6b7e3882bb5aeb1;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: ni_labpc: dma requires an interrupt DMA support only works if an interrupt is available. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 744db1f5aa25..926c4f12d04c 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -1673,7 +1673,7 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, } #ifdef CONFIG_ISA_DMA_API - if (dma_chan == 1 || dma_chan == 3) { + if (dev->irq && (dma_chan == 1 || dma_chan == 3)) { devpriv->dma_buffer = kmalloc(dma_buffer_size, GFP_KERNEL | GFP_DMA); if (devpriv->dma_buffer) {