staging: comedi: addi_apci_3120: DMA requires an interrupt
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 20 Oct 2014 18:34:08 +0000 (11:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 07:58:35 +0000 (15:58 +0800)
commit1b90779b238a8554a465fb99b3828a9e0500ff2a
tree77364b4ddca82fc861862c19c918e17ad991d849
parentc3e1715890b2c3009155e8865d5c6d649a16a4b5
staging: comedi: addi_apci_3120: DMA requires an interrupt

An interrupt is required for DMA to work.

Factor out the DMA buffer allocation from the (*auto_attach) and only
allocate the buffers if the interrupt is available.

For aesthetics, also factor the DMA buffer free from the (*detach).

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