staging: comedi: ni_labpc: dma requires an interrupt
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Mar 2013 16:55:54 +0000 (09:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:43:01 +0000 (11:43 -0700)
DMA support only works if an interrupt is available.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_labpc.c

index 744db1f..926c4f1 100644 (file)
@@ -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) {