diff mbox

spi: ti-ssp: Remove duplicate code to check full duplex transfer

Message ID 1395110917.15410.1.camel@phoenix (mailing list archive)
State New, archived
Headers show

Commit Message

Axel Lin March 18, 2014, 2:48 a.m. UTC
This driver has set SPI_MASTER_HALF_DUPLEX flag, so spi core will reject full
duplex transfer. We can remove the same checking in ti_ssp_spi_transfer().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/spi/spi-ti-ssp.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Mark Brown March 18, 2014, 5:35 p.m. UTC | #1
On Tue, Mar 18, 2014 at 10:48:37AM +0800, Axel Lin wrote:
> This driver has set SPI_MASTER_HALF_DUPLEX flag, so spi core will reject full
> duplex transfer. We can remove the same checking in ti_ssp_spi_transfer().

Arnd has actually been working on removing this driver since it appears
to be unused - it got a few acks now so I just applied the patch
deleting it entirely.
diff mbox

Patch

diff --git a/drivers/spi/spi-ti-ssp.c b/drivers/spi/spi-ti-ssp.c
index 7d20e12..116640c 100644
--- a/drivers/spi/spi-ti-ssp.c
+++ b/drivers/spi/spi-ti-ssp.c
@@ -256,11 +256,6 @@  static int ti_ssp_spi_transfer(struct spi_device *spi, struct spi_message *m)
 			dev_err(&spi->dev, "invalid xfer, no buffer\n");
 			return -EINVAL;
 		}
-
-		if (t->len && t->rx_buf && t->tx_buf) {
-			dev_err(&spi->dev, "invalid xfer, full duplex\n");
-			return -EINVAL;
-		}
 	}
 
 	spin_lock(&hw->lock);