From: Hannu Heikkinen Date: Thu, 24 Feb 2011 19:31:33 +0000 (+0200) Subject: spi/omap_mcspi: Off-by-one error in finding the right divisor X-Git-Tag: v2.6.39-rc1~417^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57d9c10dd91f942f836592f407d6351e2969548a;p=pandora-kernel.git spi/omap_mcspi: Off-by-one error in finding the right divisor Off-by-one error, gave erroneous divisor value 16 if speed_hz is over zero but less than OMAP2_MCSPI_MAX_FREQ / (1 << 15), that is, [1..1463]. Also few overly complex bit shifts in divisor fixed. Also one dev_dgb line fixed, which indicated max speed exceeding transfer speed. Introducing a new function omap2_mcspi_calc_divisor() for getting the right divisor in omap2_mcspi_setup_transfer(). Signed-off-by: Phil Carmody Signed-off-by: Hannu Heikkinen Signed-off-by: Grant Likely --- Reading git-diff-tree failed