From 4bc030446fd6d4ad3d719228f2f30be2b989c575 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 27 May 2014 10:31:09 -0700 Subject: [PATCH] staging: comedi: das16: use cfc_bytes_per_scan() Use the comedi_fc helper to get the number of bytes per scan. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index f40d42298a11..2feecf199f27 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -762,8 +762,7 @@ static int das16_cmd_exec(struct comedi_device *dev, struct comedi_subdevice *s) return -1; } - devpriv->adc_byte_count = - cmd->stop_arg * cmd->chanlist_len * sizeof(uint16_t); + devpriv->adc_byte_count = cmd->stop_arg * cfc_bytes_per_scan(s); if (devpriv->can_burst) outb(DAS1600_CONV_DISABLE, dev->iobase + DAS1600_CONV_REG); -- 2.39.5