Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456980
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel Wagner <wagi@monom.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/4] misc: tifm: use complete() instead of complete_all() |
| Date | Fri, 05 Aug 2016 11:30:02 +0200 |
| Message-ID | <s2JC2-5By-11@gated-at.bofh.it> (permalink) |
| References | <s2JC2-5By-9@gated-at.bofh.it> |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Fri, 5 Aug 2016 11:26:03 +0200 |
| X-Original-Message-ID | <1470389163-4594-5-git-send-email-wagi@monom.org> |
| X-Original-References | <1470389163-4594-1-git-send-email-wagi@monom.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1456980 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] Use complete() instead of complete_all() Daniel Wagner <wagi@monom.org> - 2016-08-05 11:30 +0200 [PATCH 2/4] misc: mic: vop: use complete() instead of complete_all() Daniel Wagner <wagi@monom.org> - 2016-08-05 11:30 +0200 [PATCH 4/4] misc: tifm: use complete() instead of complete_all() Daniel Wagner <wagi@monom.org> - 2016-08-05 11:30 +0200 [PATCH 1/4] misc: mic: scif: use complete() instead of complete_all() Daniel Wagner <wagi@monom.org> - 2016-08-05 11:30 +0200 [PATCH 3/4] misc: ti-st: use complete() instead of complete_all() Daniel Wagner <wagi@monom.org> - 2016-08-05 11:30 +0200
csiph-web