Revert "spi: Add check for 8-bit transfer with 8 IO mode support"
This reverts commit 82b29ee8ba
which is
commit 710505212e3272396394f8cf78e3ddfd05df3f22 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I6727c91fc52be0c25b57d9b7f0ba14118b109b8d
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -4010,13 +4010,10 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)
|
||||
xfer->tx_nbits != SPI_NBITS_QUAD)
|
||||
return -EINVAL;
|
||||
if ((xfer->tx_nbits == SPI_NBITS_DUAL) &&
|
||||
!(spi->mode & (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL)))
|
||||
!(spi->mode & (SPI_TX_DUAL | SPI_TX_QUAD)))
|
||||
return -EINVAL;
|
||||
if ((xfer->tx_nbits == SPI_NBITS_QUAD) &&
|
||||
!(spi->mode & (SPI_TX_QUAD | SPI_TX_OCTAL)))
|
||||
return -EINVAL;
|
||||
if ((xfer->tx_nbits == SPI_NBITS_OCTAL) &&
|
||||
!(spi->mode & SPI_TX_OCTAL))
|
||||
!(spi->mode & SPI_TX_QUAD))
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Check transfer rx_nbits */
|
||||
@@ -4028,13 +4025,10 @@ static int __spi_validate(struct spi_device *spi, struct spi_message *message)
|
||||
xfer->rx_nbits != SPI_NBITS_QUAD)
|
||||
return -EINVAL;
|
||||
if ((xfer->rx_nbits == SPI_NBITS_DUAL) &&
|
||||
!(spi->mode & (SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
|
||||
!(spi->mode & (SPI_RX_DUAL | SPI_RX_QUAD)))
|
||||
return -EINVAL;
|
||||
if ((xfer->rx_nbits == SPI_NBITS_QUAD) &&
|
||||
!(spi->mode & (SPI_RX_QUAD | SPI_RX_OCTAL)))
|
||||
return -EINVAL;
|
||||
if ((xfer->rx_nbits == SPI_NBITS_OCTAL) &&
|
||||
!(spi->mode & SPI_RX_OCTAL))
|
||||
!(spi->mode & SPI_RX_QUAD))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user