diff options
author | Geert Uytterhoeven <geert+renesas@linux-m68k.org> | 2014-01-12 08:00:29 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-13 06:20:46 -0500 |
commit | 1afd9989a6a2561183be82e420d4d2f3889b7ee7 (patch) | |
tree | 3e531ecceb2e90e234d38bd52790145b76e8625b /drivers/spi/spi.c | |
parent | 269ccca8ec1a3991e07eaf5f90326134bd17781a (diff) |
spi: core: Improve tx/rx_nbits check comments
- Rephrase the comments about tx/rx_nbits validity checks,
- Remove the stale comment about SPI_3WIRE (the code it refers to was
removed in commit 368ca4e0c75612c0a4d6bbcef7efb944604340c2 ("spi:
Eliminate 3WIRE spi_transfer check")).
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 36bfa7f820a6..9f26797e4319 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -1660,9 +1660,8 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message) | |||
1660 | if (xfer->rx_buf && !xfer->rx_nbits) | 1660 | if (xfer->rx_buf && !xfer->rx_nbits) |
1661 | xfer->rx_nbits = SPI_NBITS_SINGLE; | 1661 | xfer->rx_nbits = SPI_NBITS_SINGLE; |
1662 | /* check transfer tx/rx_nbits: | 1662 | /* check transfer tx/rx_nbits: |
1663 | * 1. keep the value is not out of single, dual and quad | 1663 | * 1. check the value matches one of single, dual and quad |
1664 | * 2. keep tx/rx_nbits is contained by mode in spi_device | 1664 | * 2. check tx/rx_nbits match the mode in spi_device |
1665 | * 3. if SPI_3WIRE, tx/rx_nbits should be in single | ||
1666 | */ | 1665 | */ |
1667 | if (xfer->tx_buf) { | 1666 | if (xfer->tx_buf) { |
1668 | if (xfer->tx_nbits != SPI_NBITS_SINGLE && | 1667 | if (xfer->tx_nbits != SPI_NBITS_SINGLE && |