提交 14f7b680 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 287a143a
...@@ -947,7 +947,9 @@ static int apci3120_cyclic_ai(int mode, ...@@ -947,7 +947,9 @@ static int apci3120_cyclic_ai(int mode,
/* If DMA Enabled */ /* If DMA Enabled */
struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0]; struct apci3120_dmabuf *dmabuf0 = &devpriv->dmabuf[0];
struct apci3120_dmabuf *dmabuf1 = &devpriv->dmabuf[1]; 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; devpriv->b_InterruptMode = APCI3120_DMA_MODE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册