]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Apr 2011 22:44:38 +0000 (15:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Apr 2011 22:44:38 +0000 (15:44 -0700)
* '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

1  2 
drivers/spi/amba-pl022.c
drivers/spi/dw_spi.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi_bfin5xx.c

diff --combined drivers/spi/amba-pl022.c
index 5825370bad25bdba23823510fffc5293d05e1e59,4b8357b728cb14c6bcd08452b445c854f2d18db1..08de58e7f59f7f6521ffb5122078103473c66117
@@@ -661,7 -661,7 +661,7 @@@ static void readwriter(struct pl022 *pl
  {
  
        /*
 -       * The FIFO depth is different inbetween primecell variants.
 +       * The FIFO depth is different between primecell variants.
         * I believe filling in too much in the FIFO might cause
         * errons in 8bit wide transfers on ARM variants (just 8 words
         * FIFO, means only 8x8 = 64 bits in FIFO) at least.
                 * This inner reader takes care of things appearing in the RX
                 * FIFO as we're transmitting. This will happen a lot since the
                 * clock starts running when you put things into the TX FIFO,
 -               * and then things are continously clocked into the RX FIFO.
 +               * and then things are continuously clocked into the RX FIFO.
                 */
                while ((readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE)
                       && (pl022->rx < pl022->rx_end)) {
@@@ -842,7 -842,7 +842,7 @@@ static void dma_callback(void *data
  
        unmap_free_dma_scatter(pl022);
  
 -      /* Update total bytes transfered */
 +      /* Update total bytes transferred */
        msg->actual_length += pl022->cur_transfer->len;
        if (pl022->cur_transfer->cs_change)
                pl022->cur_chip->
@@@ -1224,7 -1224,7 +1224,7 @@@ static irqreturn_t pl022_interrupt_hand
                                 "number of bytes on a 16bit bus?)\n",
                                 (u32) (pl022->rx - pl022->rx_end));
                }
 -              /* Update total bytes transfered */
 +              /* Update total bytes transferred */
                msg->actual_length += pl022->cur_transfer->len;
                if (pl022->cur_transfer->cs_change)
                        pl022->cur_chip->
@@@ -1415,11 -1415,11 +1415,11 @@@ static void do_polling_transfer(struct 
                       SSP_CR1(pl022->virtbase));
  
                dev_dbg(&pl022->adev->dev, "polling transfer ongoing ...\n");
 -              /* FIXME: insert a timeout so we don't hang here indefinately */
 +              /* FIXME: insert a timeout so we don't hang here indefinitely */
                while (pl022->tx < pl022->tx_end || pl022->rx < pl022->rx_end)
                        readwriter(pl022);
  
 -              /* Update total byte transfered */
 +              /* Update total byte transferred */
                message->actual_length += pl022->cur_transfer->len;
                if (pl022->cur_transfer->cs_change)
                        pl022->cur_chip->cs_control(SSP_CHIP_DESELECT);
@@@ -1555,7 -1555,7 +1555,7 @@@ static int stop_queue(struct pl022 *pl0
         * A wait_queue on the pl022->busy could be used, but then the common
         * execution path (pump_messages) would be required to call wake_up or
         * friends on every SPI message. Do this instead */
-       while (!list_empty(&pl022->queue) && pl022->busy && limit--) {
+       while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) {
                spin_unlock_irqrestore(&pl022->queue_lock, flags);
                msleep(10);
                spin_lock_irqsave(&pl022->queue_lock, flags);
@@@ -2129,7 -2129,7 +2129,7 @@@ pl022_probe(struct amba_device *adev, c
                        "probe - problem registering spi master\n");
                goto err_spi_register;
        }
 -      dev_dbg(dev, "probe succeded\n");
 +      dev_dbg(dev, "probe succeeded\n");
        /*
         * Disable the silicon block pclk and any voltage domain and just
         * power it up and clock it when it's needed
@@@ -2184,7 -2184,7 +2184,7 @@@ pl022_remove(struct amba_device *adev
        spi_unregister_master(pl022->master);
        spi_master_put(pl022->master);
        amba_set_drvdata(adev, NULL);
 -      dev_dbg(&adev->dev, "remove succeded\n");
 +      dev_dbg(&adev->dev, "remove succeeded\n");
        return 0;
  }
  
diff --combined drivers/spi/dw_spi.c
index b1a4b9f503ae06c1d7cef7eb0019c57c90453e24,d040debc07c2fa3b5790d5ceb18b309ba039635c..871e337c917fe7313621e651be0da62891545b05
@@@ -345,7 -345,7 +345,7 @@@ static void int_error_stop(struct dw_sp
  
  void dw_spi_xfer_done(struct dw_spi *dws)
  {
 -      /* Update total byte transfered return count actual bytes read */
 +      /* Update total byte transferred return count actual bytes read */
        dws->cur_msg->actual_length += dws->len;
  
        /* Move to next transfer */
@@@ -821,7 -821,7 +821,7 @@@ static int stop_queue(struct dw_spi *dw
  
        spin_lock_irqsave(&dws->lock, flags);
        dws->run = QUEUE_STOPPED;
-       while (!list_empty(&dws->queue) && dws->busy && limit--) {
+       while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
                spin_unlock_irqrestore(&dws->lock, flags);
                msleep(10);
                spin_lock_irqsave(&dws->lock, flags);
diff --combined drivers/spi/pxa2xx_spi.c
index 9c74aad6be936edaf2c59d5a3f6bf815599dabf3,3aa782067b68adcacd44cec3f23d46b8c8f8e2a1..dc25bee8d33f1d6f93deea0030712a681579b1d0
@@@ -700,7 -700,7 +700,7 @@@ static void int_transfer_complete(struc
        if (!pxa25x_ssp_comp(drv_data))
                write_SSTO(0, reg);
  
 -      /* Update total byte transfered return count actual bytes read */
 +      /* Update total byte transferred return count actual bytes read */
        drv_data->cur_msg->actual_length += drv_data->len -
                                (drv_data->rx_end - drv_data->rx);
  
@@@ -759,7 -759,7 +759,7 @@@ static irqreturn_t interrupt_transfer(s
  
                /*
                 * PXA25x_SSP has no timeout, set up rx threshould for the
 -               * remaing RX bytes.
 +               * remaining RX bytes.
                 */
                if (pxa25x_ssp_comp(drv_data)) {
  
@@@ -1493,7 -1493,7 +1493,7 @@@ static int stop_queue(struct driver_dat
         * execution path (pump_messages) would be required to call wake_up or
         * friends on every SPI message. Do this instead */
        drv_data->run = QUEUE_STOPPED;
-       while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
+       while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
                spin_unlock_irqrestore(&drv_data->lock, flags);
                msleep(10);
                spin_lock_irqsave(&drv_data->lock, flags);
index bdb7289a1d220bd6982d997d567305c39e6aa05c,f3a1c52c0fb054cdeeac4b0697c53a598a29c9ac..f706dba165cf6812fc364271d3086424ce12aa36
@@@ -905,7 -905,7 +905,7 @@@ static void bfin_spi_pump_transfers(uns
                        "IO write error!\n");
                message->state = ERROR_STATE;
        } else {
 -              /* Update total byte transfered */
 +              /* Update total byte transferred */
                message->actual_length += drv_data->len_in_bytes;
                /* Move to next transfer of this msg */
                message->state = bfin_spi_next_transfer(drv_data);
@@@ -1284,7 -1284,7 +1284,7 @@@ static inline int bfin_spi_stop_queue(s
         * friends on every SPI message. Do this instead
         */
        drv_data->running = false;
-       while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
+       while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
                spin_unlock_irqrestore(&drv_data->lock, flags);
                msleep(10);
                spin_lock_irqsave(&drv_data->lock, flags);