diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:30:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:54 (GMT) |
commit | b5fc9c1031407010ea308be15342bd01b848a853 (patch) | |
tree | 45be0f19724c705d6b4b0ef124596f974a6a50c6 /drivers/staging/comedi | |
parent | 29791cf5cc0a5d1c7b14dd6b8d31ff584c4b02af (diff) | |
download | linux-b5fc9c1031407010ea308be15342bd01b848a853.tar.xz |
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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 3742f5f..9c1b963 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; |