diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-13 09:25:48 +0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-02-24 02:32:18 +0400 |
commit | 9bec44bf0bcd623b5ea48ae1ce44205260ad4b77 (patch) | |
tree | 0fe89e0fd0243370d05e023453a5a30eab0f335d /net/nfc/nci/spi.c | |
parent | 6ea7398d00345a33b47d905875416ca4421838de (diff) | |
download | linux-9bec44bf0bcd623b5ea48ae1ce44205260ad4b77.tar.xz |
NFC: NCI: Use reinit_completion() at appropriate places
Calling init_completion() once is enough.
Then use reinit_completion() instead in __nci_request() and nci_spi_send().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc/nci/spi.c')
-rw-r--r-- | net/nfc/nci/spi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/nfc/nci/spi.c b/net/nfc/nci/spi.c index f1d426f10cce..ec250e77763a 100644 --- a/net/nfc/nci/spi.c +++ b/net/nfc/nci/spi.c @@ -105,7 +105,7 @@ int nci_spi_send(struct nci_spi *nspi, if (ret != 0 || nspi->acknowledge_mode == NCI_SPI_CRC_DISABLED) goto done; - init_completion(&nspi->req_completion); + reinit_completion(&nspi->req_completion); completion_rc = wait_for_completion_interruptible_timeout( &nspi->req_completion, NCI_SPI_SEND_TIMEOUT); @@ -145,6 +145,7 @@ struct nci_spi *nci_spi_allocate_spi(struct spi_device *spi, nspi->spi = spi; nspi->ndev = ndev; + init_completion(&nspi->req_completion); return nspi; } |