summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-10-31 22:04:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-04 03:34:17 +0300
commit5035a96f3640ee4705f69287726bfcc598212717 (patch)
tree0031520df0c1b7ce8bc5813341b12810e3aaef3a /drivers
parent836b571df7bc0bd921c503d467fd6b6d002457ec (diff)
downloadlinux-5035a96f3640ee4705f69287726bfcc598212717.tar.xz
staging: comedi: das1800: use sample manipulation helpers
Use the recently added sample manipulation helpers to remove the hardcoded assumption of the sample size. 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')
-rw-r--r--drivers/staging/comedi/drivers/das1800.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index bf8bfcf7034d..03b1ff9de92c 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -535,7 +535,7 @@ static void das1800_flush_dma_channel(struct comedi_device *dev,
/* figure out how many points to read */
num_bytes = devpriv->dma_transfer_size - get_dma_residue(channel);
- num_samples = num_bytes / sizeof(short);
+ num_samples = comedi_bytes_to_samples(s, num_bytes);
/* if we only need some of the points */
if (cmd->stop_src == TRIG_COUNT && devpriv->count < num_samples)