summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bcm63xx-hsspi.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-bcm63xx-hsspi.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-stable-aa0fe82629f19efba5c870bc9be089a4f8056a75.tar.gz
linux-stable-aa0fe82629f19efba5c870bc9be089a4f8056a75.tar.bz2
linux-stable-aa0fe82629f19efba5c870bc9be089a4f8056a75.zip
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-bcm63xx-hsspi.c')
-rw-r--r--drivers/spi/spi-bcm63xx-hsspi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index b528f9fc8bc0..3ad3e0c59992 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -180,7 +180,7 @@ static int bcm63xx_hsspi_do_txrx(struct spi_device *spi, struct spi_transfer *t)
while (pending > 0) {
int curr_step = min_t(int, step_size, pending);
- init_completion(&bs->done);
+ reinit_completion(&bs->done);
if (tx) {
memcpy_toio(bs->fifo + HSSPI_OPCODE_LEN, tx, curr_step);
tx += curr_step;
@@ -369,6 +369,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
bs->fifo = (u8 __iomem *)(bs->regs + HSSPI_FIFO_REG(0));
mutex_init(&bs->bus_mutex);
+ init_completion(&bs->done);
master->bus_num = HSSPI_BUS_NUM;
master->num_chipselect = 8;