From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161143AbcHEJ0l (ORCPT ); Fri, 5 Aug 2016 05:26:41 -0400 Received: from hotel311.server4you.de ([85.25.146.15]:47071 "EHLO hotel311.server4you.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161058AbcHEJ0N (ORCPT ); Fri, 5 Aug 2016 05:26:13 -0400 From: Daniel Wagner To: linux-kernel@vger.kernel.org Cc: Alex Dubov , Ashutosh Dixit , Greg Kroah-Hartman , Sudeep Dutt , Wolfram Sang , Daniel Wagner Subject: [PATCH 4/4] misc: tifm: use complete() instead of complete_all() Date: Fri, 5 Aug 2016 11:26:03 +0200 Message-Id: <1470389163-4594-5-git-send-email-wagi@monom.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470389163-4594-1-git-send-email-wagi@monom.org> References: <1470389163-4594-1-git-send-email-wagi@monom.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Wagner There is only one waiter for the completion, therefore there is no need to use complete_all(). Let's make that clear by using complete() instead of complete_all(). The usage pattern of the completion is: waiter context waker context tifm_7xx1_resume() DECLARE_COMPLETION_ONSTACK(finish_resume) fm->finish_me = finish_resume /* enable irq */ wait_for_completion_timeout(finish_resume) tifm_7xx1_isr() complete(fm->finish_me) Signed-off-by: Daniel Wagner --- drivers/misc/tifm_7xx1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index a37a42f..77af41c 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -69,7 +69,7 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) writel(irq_status, fm->addr + FM_INTERRUPT_STATUS); if (fm->finish_me) - complete_all(fm->finish_me); + complete(fm->finish_me); else if (!fm->socket_change_set) writel(TIFM_IRQ_ENABLE, fm->addr + FM_SET_INTERRUPT_ENABLE); else -- 2.7.4