linux-uconsole/drivers/staging
Ian Abbott dac96992f0 staging: comedi: dt3000: Fix rounding up of timer divisor
commit 8e2a589a3f upstream.

`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-25 10:47:59 +02:00
..
android staging: android: ion: Bail out upon SIGKILL when allocating memory. 2019-08-16 10:12:38 +02:00
axis-fifo staging: axis-fifo: add CONFIG_OF dependency 2019-05-04 09:20:12 +02:00
board
clocking-wizard
comedi staging: comedi: dt3000: Fix rounding up of timer divisor 2019-08-25 10:47:59 +02:00
dgnc
emxx_udc
erofs staging: erofs: add requirements field in superblock 2019-06-25 11:36:01 +08:00
fbtft staging/fbtft: Update TODO and mailing lists 2018-09-10 10:39:19 +02:00
fsl-dpaa2 staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work 2019-07-14 08:11:22 +02:00
fwserial
gasket staging: gasket: apex: fix copy-paste typo 2019-08-16 10:12:37 +02:00
gdm724x
goldfish
greybus staging: greybus: power_supply: fix prop-descriptor request size 2019-05-10 17:54:04 +02:00
gs_fpgaboot
iio staging:iio:ad7150: fix threshold mode config bit 2019-07-14 08:11:05 +02:00
ks7010
media media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails. 2019-07-26 09:14:02 +02:00
most staging: most: cdev: fix chrdev_region leak in mod_exit 2019-05-10 17:54:05 +02:00
mt29f_spinand
mt7621-dma staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc' 2018-12-05 19:32:12 +01:00
mt7621-dts
mt7621-eth
mt7621-mmc
mt7621-pci staging, mt7621-pci: fix build without pci support 2019-05-04 09:20:12 +02:00
mt7621-pinctrl staging: mt7621-pinctrl: fix uninitialized variable ngroups 2018-12-05 19:32:12 +01:00
mt7621-spi staging: spi: mt7621: Add return code check on device_reset() 2019-04-05 22:33:11 +02:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon staging: olpc_dcon: add a missing dependency 2018-12-19 19:19:49 +01:00
pi433 staging: pi433: fix potential null dereference 2019-02-12 19:47:02 +01:00
rtl8188eu staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc 2019-05-04 09:20:16 +02:00
rtl8192e
rtl8192u
rtl8712 staging: rtl8712: reduce stack usage, again 2019-07-14 08:11:22 +02:00
rtl8723bs staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc 2019-05-04 09:20:16 +02:00
rtlwifi staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc 2019-05-04 09:20:17 +02:00
rts5208
sm750fb
speakup staging: speakup_soft: Fix alternate speech with other synths 2019-04-03 06:26:25 +02:00
unisys
vboxvideo staging: vboxvideo: Change address of scanout buffer on page-flip 2018-09-11 18:39:54 +02:00
vc04_services staging: bcm2835-camera: Handle empty EOS buffers whilst streaming 2019-07-14 08:11:22 +02:00
vme
vt6655 staging: vt6655: Fix interrupt race condition on device start up. 2019-04-03 06:26:25 +02:00
vt6656 staging: vt6656: use meaningful error code during buffer allocation 2019-07-31 07:26:57 +02:00
wilc1000 staging: wilc1000: fix to set correct value for 'vif_num' 2019-03-10 07:17:16 +01:00
wlan-ng staging: wlan-ng: fix adapter initialization failure 2019-06-09 09:17:21 +02:00
xgifb
Kconfig ARM: SoC driver updates 2018-08-23 13:52:46 -07:00
Makefile ARM: SoC driver updates 2018-08-23 13:52:46 -07:00