summaryrefslogtreecommitdiffstats
path: root/drivers/staging/Makefile
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2015-10-19 13:13:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-24 19:17:13 -0700
commiteb96c7fc24fb89d7e3382260e1b391c05895cfa6 (patch)
tree405279629145bafad8b318a6832e6a52aa214bc6 /drivers/staging/Makefile
parent45037a9569183b49a9c9cf9faea294228c3963d2 (diff)
downloadlinux-stable-eb96c7fc24fb89d7e3382260e1b391c05895cfa6.tar.gz
linux-stable-eb96c7fc24fb89d7e3382260e1b391c05895cfa6.tar.bz2
linux-stable-eb96c7fc24fb89d7e3382260e1b391c05895cfa6.zip
staging: comedi: adl_pci9118: tidy up pci9118_ai_setup_dma()
For aesthetics, init the dmalen[01] local variables when they are declared. Use a local variable, 'scan_bytes', for the (devpriv->ai_n_realscanlen << 1) calculation. For aesthetics and clarification, use comedi_bytes_per_sample() instead of the '<< 1' shift to calculate the value. The local variable 'i' is badly named. Remove it and use a local variable 'tmp' where it is used. When checking the DMA buffer lengths for non-neverending commands the scan length calculation, (devpriv->ai_n_realscanlen << 1) * cmd->stop_arg, could overflow. Use and unsigned long long local variable to hold the calculation and avoid the overflow. 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/Makefile')
0 files changed, 0 insertions, 0 deletions