From: Mike Frysinger Date: Tue, 7 Apr 2009 02:00:38 +0000 (-0700) Subject: Blackfin SPI Driver: do not check for SPI errors if DMA itself did not flag any X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40a2945b97b4da9120653d84f1c3a58fe58be64c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Blackfin SPI Driver: do not check for SPI errors if DMA itself did not flag any We only need to check SPI error when DMA failes, cause that is the DMA IRQ handling routine. Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 5acec9ff0175..5ebb67b011d0 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c @@ -587,7 +587,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) while (!(read_STAT(drv_data) & SPIF)) cpu_relax(); - if (spistat & RBSY) { + if ((dmastat & DMA_ERR) && (spistat & RBSY)) { msg->state = ERROR_STATE; dev_err(&drv_data->pdev->dev, "dma receive: fifo/buffer overflow\n"); } else {