From 9bec44bf0bcd623b5ea48ae1ce44205260ad4b77 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 13 Feb 2014 13:25:48 +0800 Subject: 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 Signed-off-by: Samuel Ortiz --- net/nfc/nci/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/nfc/nci/core.c') diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 46bda01..28d0762 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -74,7 +74,7 @@ static int __nci_request(struct nci_dev *ndev, ndev->req_status = NCI_REQ_PEND; - init_completion(&ndev->req_completion); + reinit_completion(&ndev->req_completion); req(ndev, opt); completion_rc = wait_for_completion_interruptible_timeout(&ndev->req_completion, @@ -709,6 +709,7 @@ struct nci_dev *nci_allocate_device(struct nci_ops *ops, ndev->ops = ops; ndev->tx_headroom = tx_headroom; ndev->tx_tailroom = tx_tailroom; + init_completion(&ndev->req_completion); ndev->nfc_dev = nfc_allocate_device(&nci_nfc_ops, supported_protocols, -- cgit v1.1