Skip to contentSkip to conversation

mfd: mc13xxx-core: use complete() instead complete_all()

PATCH New Daniel Wagner 1 participant 1 message Sep 22, 2016 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: mc13xxx-core: use complete() instead complete_all()

From: Daniel Wagner <[email protected]>

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()

---
 drivers/mfd/mc13xxx-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/mc13xxx-core.c +1 -1
index d7f54e4..af23115 100644
@@ -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;
 }
Signature · 1 line
2.7.4