public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi-gpio: SPI_MASTER_NO_RX bit tested twice, missing SPI_MASTER_NO_TX?
@ 2010-10-02 12:03 Roel Kluin
  2010-10-03  3:02 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-10-02 12:03 UTC (permalink / raw)
  To: David Brownell, Grant Likely, spi-devel-general, Andrew Morton,
	LKML

The SPI_MASTER_NO_TX bit (can't do buffer write) wasn't tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/spi/spi_gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Is this what was intended?

diff --git a/drivers/spi/spi_gpio.c b/drivers/spi/spi_gpio.c
index e24a634..63e51b0 100644
--- a/drivers/spi/spi_gpio.c
+++ b/drivers/spi/spi_gpio.c
@@ -350,7 +350,7 @@ static int __init spi_gpio_probe(struct platform_device *pdev)
 	spi_gpio->bitbang.master = spi_master_get(master);
 	spi_gpio->bitbang.chipselect = spi_gpio_chipselect;
 
-	if ((master_flags & (SPI_MASTER_NO_RX | SPI_MASTER_NO_RX)) == 0) {
+	if ((master_flags & (SPI_MASTER_NO_TX | SPI_MASTER_NO_RX)) == 0) {
 		spi_gpio->bitbang.txrx_word[SPI_MODE_0] = spi_gpio_txrx_word_mode0;
 		spi_gpio->bitbang.txrx_word[SPI_MODE_1] = spi_gpio_txrx_word_mode1;
 		spi_gpio->bitbang.txrx_word[SPI_MODE_2] = spi_gpio_txrx_word_mode2;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-03  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-02 12:03 [PATCH] spi-gpio: SPI_MASTER_NO_RX bit tested twice, missing SPI_MASTER_NO_TX? Roel Kluin
2010-10-03  3:02 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox