[media] coda: replace completion with mutex
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 23 May 2013 13:43:00 +0000 (10:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 8 Jun 2013 22:45:58 +0000 (19:45 -0300)
commitfcb62825e7289f937f4af26a741e3af8da9242de
tree27ec1edfc3af2eea2f6b34bfdad2b837ce202ec2
parentd35167a1d69ae027615d4345a678555bf1c6fed6
[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