summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-efm32.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-09 11:06:04 +0800
committerMark Brown <broonie@linaro.org>2014-02-10 12:32:16 +0000
commitaa0fe82629f19efba5c870bc9be089a4f8056a75 (patch)
treed0d0ea5fb465f35f8fe335914dfbeb23d53c1cb8 /drivers/spi/spi-efm32.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
spi: Use reinit_completion at appropriate places
Calling init_completion() once is enough. For the rest of the iterations, call reinit_completion() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-efm32.c')
-rw-r--r--drivers/spi/spi-efm32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
index d4d3cc534792..03cbb5eb33d6 100644
--- a/drivers/spi/spi-efm32.c
+++ b/drivers/spi/spi-efm32.c
@@ -198,7 +198,7 @@ static int efm32_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
efm32_spi_filltx(ddata);
- init_completion(&ddata->done);
+ reinit_completion(&ddata->done);
efm32_spi_write32(ddata, REG_IF_TXBL | REG_IF_RXDATAV, REG_IEN);
@@ -349,6 +349,7 @@ static int efm32_spi_probe(struct platform_device *pdev)
ddata->bitbang.txrx_bufs = efm32_spi_txrx_bufs;
spin_lock_init(&ddata->lock);
+ init_completion(&ddata->done);
ddata->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(ddata->clk)) {