Commit f6364e66 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mark Brown

spi: spi-s3c64xx: Use local variable for FIFO length

More references to fifo_len are added in subsequent patch.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: default avatarAndi Shyti <andi@etezian.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 71293a60
...@@ -634,6 +634,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, ...@@ -634,6 +634,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
struct spi_transfer *xfer) struct spi_transfer *xfer)
{ {
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
const unsigned int fifo_len = (FIFO_LVL_MASK(sdd) >> 1) + 1;
int status; int status;
u32 speed; u32 speed;
u8 bpw; u8 bpw;
...@@ -655,9 +656,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, ...@@ -655,9 +656,8 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
/* Polling method for xfers not bigger than FIFO capacity */ /* Polling method for xfers not bigger than FIFO capacity */
use_dma = 0; use_dma = 0;
if (!is_polling(sdd) && if (!is_polling(sdd) && (xfer->len > fifo_len) &&
(sdd->rx_dma.ch && sdd->tx_dma.ch && sdd->rx_dma.ch && sdd->tx_dma.ch)
(xfer->len > ((FIFO_LVL_MASK(sdd) >> 1) + 1))))
use_dma = 1; use_dma = 1;
spin_lock_irqsave(&sdd->lock, flags); spin_lock_irqsave(&sdd->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment