From: Josh Wu Date: Tue, 27 Aug 2013 11:28:00 +0000 (+0100) Subject: iio: at91: fix adc_clk overflow X-Git-Tag: v3.12-rc2~1^2^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db10e201172f48dad29d81ee1fec96384f0eab35;p=pandora-kernel.git 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 Acked-by: Maxime Ripard Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed