projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d87b61
)
spi: spi-fsl-dspi: Initialize completion before possible interrupt
author
Krzysztof Kozlowski
<krzk@kernel.org>
Mon, 22 Jun 2020 11:05:43 +0000
(13:05 +0200)
committer
Mark Brown
<broonie@kernel.org>
Mon, 22 Jun 2020 12:50:29 +0000
(13:50 +0100)
The interrupt handler calls completion and is IRQ requested before the
completion is initialized. Logically it should be the other way.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link:
https://lore.kernel.org/r/20200622110543.5035-4-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-fsl-dspi.c
b/drivers/spi/spi-fsl-dspi.c
index
e0b30e4
..
91c6aff
100644
(file)
--- a/
drivers/spi/spi-fsl-dspi.c
+++ b/
drivers/spi/spi-fsl-dspi.c
@@
-1389,6
+1389,8
@@
static int dspi_probe(struct platform_device *pdev)
goto poll_mode;
}
+ init_completion(&dspi->xfer_done);
+
ret = request_threaded_irq(dspi->irq, dspi_interrupt, NULL,
IRQF_SHARED, pdev->name, dspi);
if (ret < 0) {
@@
-1396,8
+1398,6
@@
static int dspi_probe(struct platform_device *pdev)
goto out_clk_put;
}
- init_completion(&dspi->xfer_done);
-
poll_mode:
if (dspi->devtype_data->trans_mode == DSPI_DMA_MODE) {