From: H Hartley Sweeten Date: Mon, 17 Feb 2014 21:27:29 +0000 (-0700) Subject: staging: comedi: pcl816: tidy up dma buffer allocation X-Git-Tag: v3.15-rc1~139^2~953 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55b95f14304a7daa8f5253e4054a951e036c735d;p=pandora-kernel.git staging: comedi: pcl816: tidy up dma buffer allocation This driver uses 2 buffers for DMA. Refactor the buffer allocation to use a for loop to remove code duplication. Remove the dev_err() messages when __get_dma_pages() fails and change the errno returned from -EBUSY to -ENOMEM. Both buffers are the same size so replace the 'dmapages' and 'hwdmasize' arrays in the private data with variables to save a bit of space. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed