]> git.baikalelectronics.ru Git - kernel.git/commit
[media] imon: use complete() instead of complete_all()
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 16 Sep 2016 11:18:21 +0000 (08:18 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 24 Oct 2016 19:39:43 +0000 (17:39 -0200)
commitc847c0e2e36e87c90777a252dca5fd9f43f981ce
treed9027de530c3343aa66a87361d47528968854742
parent8c7573a55ab71f1e99334ac4a80061e12cc42b56
[media] imon: use complete() instead of complete_all()

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

While we are at it, we do a small optimization with the reinitialization
of the completion before we use it.

The usage pattern of the completion is:

waiter context                          waker context

send_packet()
  init_completion()
  usb_submit_urb()
  wait_for_completion_interruptible()

                                        usb_tx_callback()
                                          complete()

                                        imon_disonnect()
                                          complete()

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/imon.c