staging: comedi: pcl812: introduce pcl812_alloc_dma()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 12 Jan 2015 17:56:05 +0000 (10:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2015 22:25:21 +0000 (14:25 -0800)
commit075400af763d1a16bbbaa7e5963b9ede9765e2ad
treea80040cee0caffcc66fc8653f7f6e33632dd162b
parentceb41be712b68fac4ac834120a80fc3cb8e5ac37
staging: comedi: pcl812: introduce pcl812_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/pcl812.c