]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: pcl816: introduce pcl816_alloc_dma()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 12 Jan 2015 17:56:00 +0000 (10:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 22:25:20 +0000 (14:25 -0800)
commit1fa51639e551bee7de73122b8bbafd509eae52fa
tree996a9b8a8b8ec0bc82d0f3e64f2e9d290639275e
parent1c53093a1dea755f5ab9598d57b78f9a9444262d
staging: comedi: pcl816: introduce pcl816_alloc_dma()

The IRA and DMA are optional with this driver but both are required to
support async commands. Introduce a helper function to request the IRQ
and DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid IRQ or DMA channel or they cannot be
requested.

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