linux-xiaomi-chiron/drivers/staging
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
..
android staging: android: ion: Bail out upon SIGKILL when allocating memory. 2019-07-25 13:11:51 +02:00
axis-fifo
board
clocking-wizard
comedi staging: comedi: dt3000: Fix rounding up of timer divisor 2019-08-12 16:46:12 +02:00
emxx_udc
erofs
fbtft Staging: fbtft: Fix GPIO handling 2019-07-25 10:09:29 +02:00
fieldbus
fsl-dpaa2
fwserial
gasket staging: gasket: apex: fix copy-paste typo 2019-07-25 09:18:21 +02:00
gdm724x
goldfish
greybus
gs_fpgaboot
iio
isdn
kpc2000
ks7010
media
most
mt7621-dma
mt7621-dts
mt7621-pci
mt7621-pci-phy
mt7621-pinctrl
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
ralink-gdma
rtl8188eu
rtl8192e
rtl8192u
rtl8712
rtl8723bs
rts5208
sm750fb
speakup
unisys staging: unisys: visornic: Update the description of 'poll_for_irq()' 2019-07-25 09:42:39 +02:00
vc04_services
vme
vt6655
vt6656
wilc1000 staging: wilc1000: flush the workqueue before deinit the host 2019-07-25 09:38:15 +02:00
wlan-ng
Kconfig
Makefile