[media] coda: avoid calling SEQ_END twice
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 9 Jul 2015 10:10:16 +0000 (07:10 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 17 Jul 2015 14:14:54 +0000 (11:14 -0300)
commit5c718bb323aef02ea580073a3640b072fb2f6838
tree5f86dd06a5f58b36ef8cf5020a8b840b5dfa0cba
parent30a09579b2e238646bca4e7cc443db24d91436d6
[media] coda: avoid calling SEQ_END twice

Allow coda_seq_end_work to be called multiple times, move the setting
of ctx->initialized from coda_start/stop_streaming() into
coda_start_encoding/decoding and coda_seq_end_work, respectively,
and skip the SEQ_END command in coda_seq_end_work if the context is
already deinitialized before.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda-common.c