From 290899082a4214b16537be64a6b7e3882bb5aeb1 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 22 Mar 2013 09:55:54 -0700 Subject: [PATCH] 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 --- drivers/staging/comedi/drivers/ni_labpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2