summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-fsl-dspi.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 6ef2279a3699..6d2c7984ab0e 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -670,18 +670,10 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id)
msg->actual_length += spi_tcnt * dspi->bytes_per_word;
trans_mode = dspi->devtype_data->trans_mode;
- switch (trans_mode) {
- case DSPI_EOQ_MODE:
+ if (trans_mode == DSPI_EOQ_MODE)
dspi_eoq_read(dspi);
- break;
- case DSPI_TCFQ_MODE:
+ else if (trans_mode == DSPI_TCFQ_MODE)
dspi_tcfq_read(dspi);
- break;
- default:
- dev_err(&dspi->pdev->dev, "unsupported trans_mode %u\n",
- trans_mode);
- return IRQ_HANDLED;
- }
if (!dspi->len) {
dspi->waitflags = 1;
@@ -689,18 +681,10 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
- switch (trans_mode) {
- case DSPI_EOQ_MODE:
+ if (trans_mode == DSPI_EOQ_MODE)
dspi_eoq_write(dspi);
- break;
- case DSPI_TCFQ_MODE:
+ else if (trans_mode == DSPI_TCFQ_MODE)
dspi_tcfq_write(dspi);
- break;
- default:
- dev_err(&dspi->pdev->dev,
- "unsupported trans_mode %u\n",
- trans_mode);
- }
return IRQ_HANDLED;
}