staging: comedi: pcl818: introduce pcl818_alloc_dma()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 12 Jan 2015 17:55:55 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 22:25:20 +0000 (14:25 -0800)
commit655cd94018c9b98b9aabab8960e5b3772a5bafaf
treeca465e33d53fb3cdfd887c73bb9dc41a0849b571
parent05e511cf966fd1c806960679c579633b6c566129
staging: comedi: pcl818: introduce pcl818_alloc_dma()

DMA is optional with this driver. Introduce a helper function to request
the DMA channel and allocate the buffers. Don't fail the driver attach
if the user passed an invalid DMA channel or the channel 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/pcl818.c