From: Nikolaus Voss Date: Tue, 23 Sep 2014 13:30:21 +0000 (+0200) Subject: pwm: atmel: Fix calculation of prescale value X-Git-Tag: fixes-against-v3.18-rc2~24^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2e08970100db03bb84fd4a72f9c35bfc18d595a;p=pandora-kernel.git pwm: atmel: Fix calculation of prescale value The prescale value used for calculating the period was incremented afterwards, thus the resulting prescale value is by one too high. This resulted in a PWM frequency only half as high as requested. This patch moves the 64 bit division out of the prescale loop to correct the above issue and make the calculation more efficient. Signed-off-by: Nikolaus Voss Tested-by: Bo Shen Acked-by: Bo Shen Signed-off-by: Thierry Reding --- Reading git-diff-tree failed