diff options
author | Trent Piepho <tpiepho@gmail.com> | 2013-12-26 21:51:06 -0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-30 12:44:18 +0000 |
commit | 368ca4e0c75612c0a4d6bbcef7efb944604340c2 (patch) | |
tree | 2e8dafb17158d8d4f8b43743db263d13e68feb14 /drivers/spi/spi.c | |
parent | 89c1f60746106755e29dcc3db9f22e37000891ef (diff) |
spi: Eliminate 3WIRE spi_transfer check
Checking for SPI_3WIRE isn't needed. spi_setup() already prevents 3WIRE
mode from being combined with DUAL or QUAD mode support. So there is no
need to differentiate between a single bit device with SPI_3WIRE set and
one with without. It doesn't change the allowed bit widths.
Signed-off-by: Trent Piepho <tpiepho@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 857ee8c407b1..2cd9fdc9c7f9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1678,9 +1678,6 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message) if ((xfer->tx_nbits == SPI_NBITS_QUAD) && !(spi->mode & SPI_TX_QUAD)) return -EINVAL; - if ((spi->mode & SPI_3WIRE) && - (xfer->tx_nbits != SPI_NBITS_SINGLE)) - return -EINVAL; } /* check transfer rx_nbits */ if (xfer->rx_buf) { @@ -1694,9 +1691,6 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message) if ((xfer->rx_nbits == SPI_NBITS_QUAD) && !(spi->mode & SPI_RX_QUAD)) return -EINVAL; - if ((spi->mode & SPI_3WIRE) && - (xfer->rx_nbits != SPI_NBITS_SINGLE)) - return -EINVAL; } } |