]> git.baikalelectronics.ru Git - kernel.git/commit
spi: altera: Use DIV_ROUND_UP to calculate hw->bytes_per_word
authorAxel Lin <axel.lin@ingics.com>
Thu, 29 Aug 2013 15:41:20 +0000 (23:41 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 31 Aug 2013 13:10:41 +0000 (14:10 +0100)
commitb7e18bd3acc0bdfe1c373965805d6355d8945bc1
treeb92e9fc29c88e73bf3fc6ac2f9c8ffb21539c830
parenta7e68b5c5e2a748d9717d19b6baeb3b00933e92d
spi: altera: Use DIV_ROUND_UP to calculate hw->bytes_per_word

The Altera SPI hardware can be configured to support data width from 1 to 32
since Quartus II 8.1. To avoid truncation by integer division, use DIV_ROUND_UP
to calculate hw->bytes_per_word.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-altera.c