[PATCH 2/4] misc: mic: vop: use complete() instead of complete_all()

From: Daniel Wagner
Date: Fri Aug 05 2016 - 05:27:16 EST


From: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>

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

_vop_remove_device()
reinit_completion()
wait_for_completion()
vop_reset()
complete()

Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
---
drivers/misc/mic/vop/vop_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index 1a2b67f3..f4ed4a8 100644
--- a/drivers/misc/mic/vop/vop_main.c
+++ b/drivers/misc/mic/vop/vop_main.c
@@ -229,7 +229,7 @@ static void vop_reset(struct virtio_device *dev)
__func__, dev->id.device);

vop_reset_inform_host(dev);
- complete_all(&vdev->reset_done);
+ complete(&vdev->reset_done);
}

/*
--
2.7.4