From b5fc9c1031407010ea308be15342bd01b848a853 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 27 May 2014 10:30:58 -0700 Subject: 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/staging/comedi') 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; -- cgit v1.2.3