Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: spi_s3c24xx driver must init completion

The s3c24xx_spi_txrx() function should initialise the completion each time
before using it, otherwise we end up with the possibility of returning success
before the interrupt handler has processed all the data.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ben Dooks and committed by
Linus Torvalds
4bb5eba0 335e92e8

+3
+3
drivers/spi/spi_s3c24xx.c
··· 192 192 hw->len = t->len; 193 193 hw->count = 0; 194 194 195 + init_completion(&hw->done); 196 + 195 197 /* send the first byte */ 196 198 writeb(hw_txbyte(hw, 0), hw->regs + S3C2410_SPTDAT); 199 + 197 200 wait_for_completion(&hw->done); 198 201 199 202 return hw->count;