From: Takashi Yoshii Date: Sun, 1 Dec 2013 18:19:13 +0000 (+0900) Subject: spi: spi-sh-msiof: round up div to fix freq calculation X-Git-Tag: v3.14-rc1~91^2~5^6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4d313ff79a8b5622a8c4954ba37c6564fa922c4;p=pandora-kernel.git spi: spi-sh-msiof: round up div to fix freq calculation Truncation on integer division in sh_msiof_spi_set_clk_regs() results in insufficient transfer frequency (> max_speed_freq). For example, source 52MHz, required max 6MHz 52/6 = 8.6 --> 8, then 1/8 table selected, and result in 52/8 = 6.5 MHz (>6MHz) Rounding it up is a simple solution. 52/6 = 8.6 --> 9, then 1/16 table selected, and result in 52/16 = 3.25 MHz Signed-off-by: Takashi Yoshii Signed-off-by: Mark Brown --- Reading git-diff-tree failed