diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:31:07 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:55 (GMT) |
commit | b7a775f815f2469b40636369e73c9e3db2a045d9 (patch) | |
tree | 011163178ed54d9a286372d66ff166521bb3856c /drivers/staging/comedi | |
parent | 35a51030995157dc03142ae6f9e17741b0224beb (diff) | |
download | linux-b7a775f815f2469b40636369e73c9e3db2a045d9.tar.xz |
staging: comedi: amplc_pci230: use cfc_bytes_per_scan()
Use the comedi_fc helper function to get the 'bytes_per_scan'.
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/amplc_pci230.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index 9c82543..3895bc7 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -1197,15 +1197,13 @@ static int pci230_handle_ao_fifo(struct comedi_device *dev, unsigned int room; unsigned short dacstat; unsigned int i, n; - unsigned int bytes_per_scan; unsigned int events = 0; int running; /* Get DAC FIFO status. */ dacstat = inw(dev->iobase + PCI230_DACCON); /* Determine number of scans available in buffer. */ - bytes_per_scan = cmd->chanlist_len * sizeof(short); - num_scans = comedi_buf_read_n_available(s) / bytes_per_scan; + num_scans = comedi_buf_read_n_available(s) / cfc_bytes_per_scan(s); if (cmd->stop_src == TRIG_COUNT) { /* Fixed number of scans. */ if (num_scans > devpriv->ao_scan_count) |