staging: comedi: ni_at_a2150: introduce a2150_alloc_irq_dma()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 12 Jan 2015 17:55:48 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 22:25:19 +0000 (14:25 -0800)
commit7cbb0ef93a63f7c0574d852607af71f348ccc751
treef857f06ade0f4e0692cd29e70b45b42eb02f890e
parent2447a27c877a1a4995a85eb4bc456551c0c5a5f9
staging: comedi: ni_at_a2150: introduce a2150_alloc_irq_dma()

This driver requires an IRQ and DMA in order to support async commands.

For aesthetics, introduce a helper function to request the IRQ and DMA
channels and allocate the DMA buffer. Since the async command support
is optional, make the helper function handle any request/allocation
errors and allow the driver to still attach without async command support.

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/ni_at_a2150.c