summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-05-27 10:30:58 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 14:28:54 -0700
commitb5fc9c1031407010ea308be15342bd01b848a853 (patch)
tree45be0f19724c705d6b4b0ef124596f974a6a50c6 /drivers/staging/comedi
parent29791cf5cc0a5d1c7b14dd6b8d31ff584c4b02af (diff)
staging: comedi: pcl816: fix DMA 'bytes' calculation
The calculation for the total number of bytes in the DMA transfer is incorrect. Fix it. 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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/pcl816.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index 3742f5f78fc6..9c1b963a0bed 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -164,9 +164,7 @@ static void pcl816_ai_setup_dma(struct comedi_device *dev,
bytes = devpriv->hwdmasize;
if (cmd->stop_src == TRIG_COUNT) {
/* how many */
- bytes = s->async->cmd.chanlist_len *
- s->async->cmd.chanlist_len *
- sizeof(short);
+ bytes = cmd->stop_arg * cmd->chanlist_len * sizeof(short);
/* how many DMA pages we must fill */
devpriv->dma_runs_to_end = bytes / devpriv->hwdmasize;