diff options
author | Mark Brown <broonie@kernel.org> | 2015-03-26 17:50:42 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-26 17:50:42 -0700 |
commit | 1be38e041f8eaa935f370aa0f34dd7a2fe39b1d8 (patch) | |
tree | 2d89734fc831593784bd411be03a1b9649de4c9d /drivers/spi/spi-dw.c | |
parent | 6935224da2482a261c786501fbccb1dc4a675225 (diff) | |
parent | bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff) |
Merge tag 'v4.0-rc5' into spi-bcm2835
Linux 4.0-rc5
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r-- | drivers/spi/spi-dw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 5a97a62b298a..4847afba89f4 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -621,14 +621,14 @@ static void spi_hw_init(struct device *dev, struct dw_spi *dws) if (!dws->fifo_len) { u32 fifo; - for (fifo = 2; fifo <= 256; fifo++) { + for (fifo = 1; fifo < 256; fifo++) { dw_writew(dws, DW_SPI_TXFLTR, fifo); if (fifo != dw_readw(dws, DW_SPI_TXFLTR)) break; } dw_writew(dws, DW_SPI_TXFLTR, 0); - dws->fifo_len = (fifo == 2) ? 0 : fifo - 1; + dws->fifo_len = (fifo == 1) ? 0 : fifo; dev_dbg(dev, "Detected FIFO size: %u bytes\n", dws->fifo_len); } } |