alistair23-linux/drivers/staging/comedi
Ian Abbott 8e2a589a3f staging: comedi: dt3000: Fix rounding up of timer divisor
`dt3k_ns_to_timer()` determines the prescaler and divisor to use to
produce a desired timing period.  It is influenced by a rounding mode
and can round the divisor up, down, or to the nearest value.  However,
the code for rounding up currently does the same as rounding down!  Fix
ir by using the `DIV_ROUND_UP()` macro to calculate the divisor when
rounding up.

Also, change the types of the `divider`, `base` and `prescale` variables
from `int` to `unsigned int` to avoid mixing signed and unsigned types
in the calculations.

Also fix a typo in a nearby comment: "improvment" => "improvement".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190812120814.21188-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12 16:46:12 +02:00
..
drivers staging: comedi: dt3000: Fix rounding up of timer divisor 2019-08-12 16:46:12 +02:00
kcomedilib staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
comedi.h
comedi_buf.c staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap 2019-06-26 09:32:13 +08:00
comedi_compat32.c
comedi_compat32.h
comedi_fops.c staging: comedi: use dma_mmap_coherent for DMA-able buffer mmap 2019-06-26 09:32:13 +08:00
comedi_internal.h
comedi_pci.c
comedi_pci.h
comedi_pcmcia.c
comedi_pcmcia.h
comedi_usb.c
comedi_usb.h
comedidev.h staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest 2019-03-18 07:57:58 +01:00
comedilib.h
drivers.c staging: comedi: Add lockdep_assert_held() calls for dev->attach_lock 2019-04-19 14:33:41 +02:00
Kconfig staging: comedi: use help instead of ---help--- in Kconfig 2019-04-19 15:01:50 +02:00
Makefile
proc.c
range.c
TODO