staging: comedi: ni_labpc: use labpc_have_dma_chan()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 28 Jun 2013 16:09:22 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 21:27:51 +0000 (14:27 -0700)
commit5c8a138e9d33df4960e3cb497c60723c7fbdacf9
tree62ebab32f9a64668e1094f2bd9e86d90721ea998
parentc6208c2f358056d77544024373e9d73dd899a384
staging: comedi: ni_labpc: use labpc_have_dma_chan()

Call the new static inline function `labpc_have_dma_chan()` from
`labpc_ai_cmd()` to check if the ISA DMA channel has been initialized,
tidying up the surrounding code and removing an `#ifdef`.  If the
"ni_labpc_isadma" module is not being built, `labpc_have_dma_chan()`
doesn't bother checking the DMA channel and just returns `false`,
allowing the compiler to optimize out a small amount of code.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_labpc.c