diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2018-04-17 17:29:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-18 14:37:29 +0300 |
commit | f6364e66c66135f40709635849620411f3f8a2ff (patch) | |
tree | 10c28903cedb9d3e6b252862ef9b3c23e7f14a49 /drivers | |
parent | 71293a60e38f44b1d18c14803f0dd2744f6b9a12 (diff) | |
download | linux-f6364e66c66135f40709635849620411f3f8a2ff.tar.xz |
spi: spi-s3c64xx: Use local variable for FIFO length
More references to fifo_len are added in subsequent patch.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index db33bc9b4147..27cd8c59eabf 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -634,6 +634,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, struct spi_transfer *xfer) { struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); + const unsigned int fifo_len = (FIFO_LVL_MASK(sdd) >> 1) + 1; int status; u32 speed; u8 bpw; @@ -655,9 +656,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, /* Polling method for xfers not bigger than FIFO capacity */ use_dma = 0; - if (!is_polling(sdd) && - (sdd->rx_dma.ch && sdd->tx_dma.ch && - (xfer->len > ((FIFO_LVL_MASK(sdd) >> 1) + 1)))) + if (!is_polling(sdd) && (xfer->len > fifo_len) && + sdd->rx_dma.ch && sdd->tx_dma.ch) use_dma = 1; spin_lock_irqsave(&sdd->lock, flags); |