From a7f0ce8e5d84f2d14ca77d3c539af16cfef1981e Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 14 Jan 2015 10:05:16 -0700 Subject: [PATCH] staging: comedi: pcl812: use common function to setup dma The pcl812_ai_setup_dma() and pcl812_ai_setup_next_dma() functions are similar other than the buffer switch and the inclusion of the "unread_samples" in pcl818_ai_setup_next_dma() when calculating the dma size. Merge these two functions by initializing the 'dma->cur_dma' in the callers and passing '0' for the "unread_samples" when first starting the DMA. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed