Skip to contentSkip to conversation

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

PATCH In review Axel Lin 2 participants 2 messages Mar 18, 2014 SPI

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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

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().

---
 drivers/spi/spi-ti-ssp.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/spi/spi-ti-ssp.c +0 -5
index 7d20e12..116640c 100644
@@ -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);
Signature · 8 lines
1.8.3.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 2 lines · Axel Lin

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.