diff options
author | George Shore <george@georgeshore.com> | 2010-01-21 06:40:51 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-01-21 09:25:10 -0500 |
commit | f4aec798ae5a837a1f062e295f9a5f1b00962589 (patch) | |
tree | 73c84ab0528fb7d9df5246c2cef6ea621d19c722 | |
parent | 426c0093d8da4d7b6b0e62cda917b1bae26db4c2 (diff) |
spi/dw_spi: remove conditional from 'poll_transfer'.
The 'poll_transfer' function employs a conditional to test whether the
transmit buffer is valid; in doing so, on a receive operation no data is
clocked out, thus no data is clocked in and ultimately errors appear.
This removes the conditional as the transmit function will be set to a null
writer when the transmit buffer is invalid, allowing the driver to clock
0x00 out to the device to receive data from the device.
Signed-off-by: George Shore <george@georgeshore.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r-- | drivers/spi/dw_spi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index d0a080a5b598..3853df5db052 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c | |||
@@ -408,12 +408,9 @@ static irqreturn_t dw_spi_irq(int irq, void *dev_id) | |||
408 | /* Must be called inside pump_transfers() */ | 408 | /* Must be called inside pump_transfers() */ |
409 | static void poll_transfer(struct dw_spi *dws) | 409 | static void poll_transfer(struct dw_spi *dws) |
410 | { | 410 | { |
411 | if (dws->tx) { | 411 | while (dws->write(dws)) |
412 | while (dws->write(dws)) | 412 | dws->read(dws); |
413 | dws->read(dws); | ||
414 | } | ||
415 | 413 | ||
416 | dws->read(dws); | ||
417 | transfer_complete(dws); | 414 | transfer_complete(dws); |
418 | } | 415 | } |
419 | 416 | ||