summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-30 05:00:23 +0200
committerMark Brown <broonie@linaro.org>2013-09-17 01:24:56 +0200
commite91d2352bb6ebd061b362b3c632ec517ac0c23b1 (patch)
tree9f7367a2ffd833b3e8f6b6e134f651af7c7e05e8 /drivers/spi/spi-tegra20-slink.c
parentLinux 3.12-rc1 (diff)
downloadlinux-e91d2352bb6ebd061b362b3c632ec517ac0c23b1.tar.xz
linux-e91d2352bb6ebd061b362b3c632ec517ac0c23b1.zip
spi: tegra: Use DIV_ROUND_UP instead of open coded
This also makes the intention more clear. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index c70353672a23..231b84523d37 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -283,7 +283,7 @@ static unsigned tegra_slink_calculate_curr_xfer_param(
unsigned total_fifo_words;
bits_per_word = t->bits_per_word;
- tspi->bytes_per_word = (bits_per_word - 1) / 8 + 1;
+ tspi->bytes_per_word = DIV_ROUND_UP(bits_per_word, 8);
if (bits_per_word == 8 || bits_per_word == 16) {
tspi->is_packed = 1;