rk30:modify spin_lock_irqsave/restore operation in spi driver
authorlw <lw@rock-chips.com>
Sat, 7 Apr 2012 02:49:53 +0000 (10:49 +0800)
committerlw <lw@rock-chips.com>
Sat, 7 Apr 2012 02:49:53 +0000 (10:49 +0800)
drivers/spi/rk29_spim.c

index aceaa99e13e641f6365fbde503b50f0be6daf833..04331a242b1e1cde18a024e4926ad1a0d9dce308 100755 (executable)
@@ -427,10 +427,11 @@ static void rk29_spi_dma_rxcb(void *buf_id,
        //if (!(dws->state & TXBUSY))\r
        //      complete(&dws->rx_completion);\r
        \r
+       spin_unlock_irqrestore(&dws->lock, flags);\r
+       \r
        //DMA could not lose intterupt\r
        transfer_complete(dws);\r
 \r
-       spin_unlock_irqrestore(&dws->lock, flags);\r
 }\r
 \r
 static void rk29_spi_dma_txcb(void *buf_id,\r
@@ -452,10 +453,11 @@ static void rk29_spi_dma_txcb(void *buf_id,
        //if (!(dws->state & RXBUSY)) \r
        //      complete(&dws->tx_completion);\r
 \r
+       spin_unlock_irqrestore(&dws->lock, flags);\r
+       \r
        //DMA could not lose intterupt\r
        transfer_complete(dws);\r
 \r
-       spin_unlock_irqrestore(&dws->lock, flags);\r
 }\r
 \r
 \r