Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488885 > unrolled thread

[PATCH] mfd: mc13xxx-core: use complete() instead complete_all()

Started byDaniel Wagner <wagi@monom.org>
First post2016-09-22 15:50 +0200
Last post2016-09-22 15:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] mfd: mc13xxx-core: use complete() instead complete_all() Daniel Wagner <wagi@monom.org> - 2016-09-22 15:50 +0200

#1488885 — [PATCH] mfd: mc13xxx-core: use complete() instead complete_all()

FromDaniel Wagner <wagi@monom.org>
Date2016-09-22 15:50 +0200
Subject[PATCH] mfd: mc13xxx-core: use complete() instead complete_all()
Message-ID<skcxX-71r-1@gated-at.bofh.it>
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

mc13xxx_adc_do_conversion()
  struct mc13xxx_adcdone_data adcdone_data

  init_completion(&adcdone_data.done)
  mc13xxx_irq_request()
  wait_for_completeion_interruptible()

                                        mc13xxx_handler_adcdone()
                                          complete()

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/mc13xxx-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index d7f54e4..af23115 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -245,7 +245,7 @@ static irqreturn_t mc13xxx_handler_adcdone(int irq, void *data)
 {
 	struct mc13xxx_adcdone_data *adcdone_data = data;
 
-	complete_all(&adcdone_data->done);
+	complete(&adcdone_data->done);
 
 	return IRQ_HANDLED;
 }
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web