mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: linux-kernel@vger.kernel.org
Cc: Alex Dubov <oakad@yahoo.com>,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sudeep Dutt <sudeep.dutt@intel.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Daniel Wagner <daniel.wagner@bmw-carit.de>
Subject: [PATCH 4/4] misc: tifm: use complete() instead of complete_all()
Date: Fri,  5 Aug 2016 11:26:03 +0200	[thread overview]
Message-ID: <1470389163-4594-5-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1470389163-4594-1-git-send-email-wagi@monom.org>

From: Daniel Wagner <daniel.wagner@bmw-carit.de>

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 <daniel.wagner@bmw-carit.de>
---
 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

  parent reply	other threads:[~2016-08-05  9:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  9:25 [PATCH 0/4] Use " Daniel Wagner
2016-08-05  9:26 ` [PATCH 1/4] misc: mic: scif: use " Daniel Wagner
2016-08-05  9:26 ` [PATCH 2/4] misc: mic: vop: " Daniel Wagner
2016-08-05  9:26 ` [PATCH 3/4] misc: ti-st: " Daniel Wagner
2016-08-05  9:26 ` Daniel Wagner [this message]
2016-08-14 22:51 ` [PATCH 0/4] Use " Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470389163-4594-5-git-send-email-wagi@monom.org \
    --to=wagi@monom.org \
    --cc=ashutosh.dixit@intel.com \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    --cc=sudeep.dutt@intel.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®