In labpc_ai_cmd(), the thisboard->bustype check when determining the method used to transfer the data is unnecessary. Only the "isa_bustype" allocates a dma_chan so if the dma_chan is valid the isa_dma_transfer will work. Remove the unnecessary check. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/ni_labpc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 7ef36f7..48d5d5a 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -797,19 +797,16 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) dev->iobase + COUNTER_A_CONTROL_REG); #ifdef CONFIG_ISA_DMA_API - /* figure out what method we will use to transfer data */ - if (devpriv->dma_chan && /* need a dma channel allocated */ - /* - * dma unsafe at RT priority, - * and too much setup time for TRIG_WAKE_EOS for - */ - (cmd->flags & (TRIG_WAKE_EOS | TRIG_RT)) == 0 && - /* only available on the isa boards */ - thisboard->bustype == isa_bustype) { + /* + * DMA unsafe at RT priority and too much setup time + * for TRIG_WAKE_EOS. + */ + if (devpriv->dma_chan && + (cmd->flags & (TRIG_WAKE_EOS | TRIG_RT)) == 0) { xfer = isa_dma_transfer; - /* pc-plus has no fifo-half full interrupt */ } else #endif + /* pc-plus has no fifo-half full interrupt */ if (thisboard->register_layout == labpc_1200_layout && /* wake-end-of-scan should interrupt on fifo not empty */ (cmd->flags & TRIG_WAKE_EOS) == 0 && -- 1.8.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel