aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 18:44:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 18:44:38 -0400
commit6b98cd5aad3bb51a3b5b51ba670ab8d5fe1cc487 (patch)
treec38970f362c4de594a7433de5989cae0a199d199 /drivers/spi
parentb42282e5a05018ecdc0d63a4ad530b0999785912 (diff)
parent8faa7cf828bca1745a4ed599876567f5afc47544 (diff)
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6: dt/fsldma: fix build warning caused by of_platform_device changes spi: Fix race condition in stop_queue() gpio/pch_gpio: Fix output value of pch_gpio_direction_output() gpio/ml_ioh_gpio: Fix output value of ioh_gpio_direction_output() gpio/pca953x: fix error handling path in probe() call
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/amba-pl022.c2
-rw-r--r--drivers/spi/dw_spi.c2
-rw-r--r--drivers/spi/pxa2xx_spi.c2
-rw-r--r--drivers/spi/spi_bfin5xx.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index 5825370bad25..08de58e7f59f 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1555,7 +1555,7 @@ static int stop_queue(struct pl022 *pl022)
1555 * A wait_queue on the pl022->busy could be used, but then the common 1555 * A wait_queue on the pl022->busy could be used, but then the common
1556 * execution path (pump_messages) would be required to call wake_up or 1556 * execution path (pump_messages) would be required to call wake_up or
1557 * friends on every SPI message. Do this instead */ 1557 * friends on every SPI message. Do this instead */
1558 while (!list_empty(&pl022->queue) && pl022->busy && limit--) { 1558 while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) {
1559 spin_unlock_irqrestore(&pl022->queue_lock, flags); 1559 spin_unlock_irqrestore(&pl022->queue_lock, flags);
1560 msleep(10); 1560 msleep(10);
1561 spin_lock_irqsave(&pl022->queue_lock, flags); 1561 spin_lock_irqsave(&pl022->queue_lock, flags);
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index b1a4b9f503ae..871e337c917f 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws)
821 821
822 spin_lock_irqsave(&dws->lock, flags); 822 spin_lock_irqsave(&dws->lock, flags);
823 dws->run = QUEUE_STOPPED; 823 dws->run = QUEUE_STOPPED;
824 while (!list_empty(&dws->queue) && dws->busy && limit--) { 824 while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
825 spin_unlock_irqrestore(&dws->lock, flags); 825 spin_unlock_irqrestore(&dws->lock, flags);
826 msleep(10); 826 msleep(10);
827 spin_lock_irqsave(&dws->lock, flags); 827 spin_lock_irqsave(&dws->lock, flags);
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 9c74aad6be93..dc25bee8d33f 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1493,7 +1493,7 @@ static int stop_queue(struct driver_data *drv_data)
1493 * execution path (pump_messages) would be required to call wake_up or 1493 * execution path (pump_messages) would be required to call wake_up or
1494 * friends on every SPI message. Do this instead */ 1494 * friends on every SPI message. Do this instead */
1495 drv_data->run = QUEUE_STOPPED; 1495 drv_data->run = QUEUE_STOPPED;
1496 while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { 1496 while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
1497 spin_unlock_irqrestore(&drv_data->lock, flags); 1497 spin_unlock_irqrestore(&drv_data->lock, flags);
1498 msleep(10); 1498 msleep(10);
1499 spin_lock_irqsave(&drv_data->lock, flags); 1499 spin_lock_irqsave(&drv_data->lock, flags);
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index bdb7289a1d22..f706dba165cf 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1284,7 +1284,7 @@ static inline int bfin_spi_stop_queue(struct bfin_spi_master_data *drv_data)
1284 * friends on every SPI message. Do this instead 1284 * friends on every SPI message. Do this instead
1285 */ 1285 */
1286 drv_data->running = false; 1286 drv_data->running = false;
1287 while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { 1287 while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
1288 spin_unlock_irqrestore(&drv_data->lock, flags); 1288 spin_unlock_irqrestore(&drv_data->lock, flags);
1289 msleep(10); 1289 msleep(10);
1290 spin_lock_irqsave(&drv_data->lock, flags); 1290 spin_lock_irqsave(&drv_data->lock, flags);