spi: core: Improve tx/rx_nbits check comments
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Sun, 12 Jan 2014 13:00:29 +0000 (14:00 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 13 Jan 2014 11:20:46 +0000 (11:20 +0000)
  - 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>
drivers/spi/spi.c

index 36bfa7f820a631f4933995bcd2ebad6b30bb5754..9f26797e4319c849b07e2f49c3ff645eb17ee721 100644 (file)
@@ -1660,9 +1660,8 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)
                if (xfer->rx_buf && !xfer->rx_nbits)
                        xfer->rx_nbits = SPI_NBITS_SINGLE;
                /* check transfer tx/rx_nbits:
-                * 1. keep the value is not out of single, dual and quad
-                * 2. keep tx/rx_nbits is contained by mode in spi_device
-                * 3. if SPI_3WIRE, tx/rx_nbits should be in single
+                * 1. check the value matches one of single, dual and quad
+                * 2. check tx/rx_nbits match the mode in spi_device
                 */
                if (xfer->tx_buf) {
                        if (xfer->tx_nbits != SPI_NBITS_SINGLE &&