summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-sflash.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-25 10:51:39 +0200
committerMark Brown <broonie@linaro.org>2013-10-25 10:51:39 +0200
commit5b380cb1522e774e2fd67392532963426a749ce8 (patch)
treef8d0fcbebb14c387ed4dd71509aaa7af5a5ca9df /drivers/spi/spi-tegra20-sflash.c
parentMerge remote-tracking branch 'spi/topic/s3c64xx' into spi-next (diff)
parentspi: tegra: Use DIV_ROUND_UP instead of open coded (diff)
downloadlinux-5b380cb1522e774e2fd67392532963426a749ce8.tar.xz
linux-5b380cb1522e774e2fd67392532963426a749ce8.zip
Merge remote-tracking branch 'spi/topic/tegra' into spi-next
Diffstat (limited to 'drivers/spi/spi-tegra20-sflash.c')
-rw-r--r--drivers/spi/spi-tegra20-sflash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index a68d7797a8ec..79be8ce6a9d1 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -173,7 +173,7 @@ static unsigned tegra_sflash_calculate_curr_xfer_param(
unsigned remain_len = t->len - tsd->cur_pos;
unsigned max_word;
- tsd->bytes_per_word = (t->bits_per_word - 1) / 8 + 1;
+ tsd->bytes_per_word = DIV_ROUND_UP(t->bits_per_word, 8);
max_word = remain_len / tsd->bytes_per_word;
if (max_word > SPI_FIFO_DEPTH)
max_word = SPI_FIFO_DEPTH;