Commit 14f7b680 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: hwdrv_apci3120: use sample manipulation helpers



Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 287a143a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -947,7 +947,9 @@ static int apci3120_cyclic_ai(int mode,
		/* If DMA Enabled */
		struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0];
		struct apci3120_dmabuf *dmabuf1 = &devpriv->dmabuf[1];
		unsigned int scan_bytes = cmd->scan_end_arg * sizeof(short);
		unsigned int scan_bytes;

		scan_bytes = comedi_samples_to_bytes(s, cmd->scan_end_arg);

		devpriv->b_InterruptMode = APCI3120_DMA_MODE;