aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-09-02 21:36:46 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-09-08 14:05:02 -0400
commitc3f139b65585a5f29df47b2302ff8dbd9bdad0b0 (patch)
tree8cda25941c59391020440309c1a642eee7943de4 /drivers/spi
parent251ee478f2c877a9a80362e094c542fbac7f5651 (diff)
spi/s3c64xx: Fix incorrect reuse of 'val' local variable.
Instead of, wrongly, reusing the 'val' variable, use a dedicated one for reading the status register. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_s3c64xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi_s3c64xx.c b/drivers/spi/spi_s3c64xx.c
index 240b690a8a6f..ef9dacabe062 100644
--- a/drivers/spi/spi_s3c64xx.c
+++ b/drivers/spi/spi_s3c64xx.c
@@ -326,10 +326,11 @@ static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
326 val = msecs_to_jiffies(ms) + 10; 326 val = msecs_to_jiffies(ms) + 10;
327 val = wait_for_completion_timeout(&sdd->xfer_completion, val); 327 val = wait_for_completion_timeout(&sdd->xfer_completion, val);
328 } else { 328 } else {
329 u32 status;
329 val = msecs_to_loops(ms); 330 val = msecs_to_loops(ms);
330 do { 331 do {
331 val = readl(regs + S3C64XX_SPI_STATUS); 332 status = readl(regs + S3C64XX_SPI_STATUS);
332 } while (RX_FIFO_LVL(val, sci) < xfer->len && --val); 333 } while (RX_FIFO_LVL(status, sci) < xfer->len && --val);
333 } 334 }
334 335
335 if (!val) 336 if (!val)