summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJosh Wu <josh.wu@atmel.com>2013-08-27 12:28:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-09-18 19:43:20 +0100
commitdb10e201172f48dad29d81ee1fec96384f0eab35 (patch)
tree8d99b9b0c2db7151988ba3f5c961763587e558a2 /drivers/staging
parentc3cb718acc17f8e0d6b4b8d1f8ca9a20d1999159 (diff)
downloadop-kernel-dev-db10e201172f48dad29d81ee1fec96384f0eab35.zip
op-kernel-dev-db10e201172f48dad29d81ee1fec96384f0eab35.tar.gz
iio: at91: fix adc_clk overflow
The adc_clk variable is currently defined using a 32-bits unsigned integer, which will overflow under some very valid range of operations. Such overflow will occur if, for example, the parent clock is set to a 20MHz frequency and the ADC startup time is larger than 215ns. To fix this, introduce an intermediate variable holding the clock rate in kHz. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud