upstream: [media] coda: replace completion with mutex
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 23 May 2013 13:43:00 +0000 (10:43 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:48:06 +0000 (11:48 +0900)
commite055f46eb77160b20e96afa6234d971852bb48cd
tree3ba65a8bcc5f44a8f3527381b055cf375eb0a762
parent39ea6405ebcfea6d99cb39657e01d6b8255e4f41
upstream: [media] coda: replace completion with mutex

Not only do we need to wait for job completion when we want to
call a command on the CODA in start/stop_streaming, we also need
to make sure that a new job doesn't start before the command
finished.
Use a mutex to lock the coda command handling. On timeout, the
device_run job must be marked as finished and the mutex released,
as otherwise coda_release will block.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/coda.c