[media] coda: clear aborting flag in stop_streaming
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 29 Sep 2014 12:53:42 +0000 (09:53 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Oct 2014 16:14:12 +0000 (14:14 -0200)
Clearing the aborting flag in stop_streaming is necessary if we want to start
streaming again without having to closing and reopening the device. Also,
do not explicitly set it in default_params; the context is zeroed by
kzalloc anyway.

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@osg.samsung.com>
drivers/media/platform/coda/coda-common.c

index ced47609f5efd20ac66d7851bc8438dee360e671..3f8a04fe01a7a8ef5511ff33bcff9f2c9e0c600c 100644 (file)
@@ -880,7 +880,6 @@ static void set_default_params(struct coda_ctx *ctx)
        ctx->params.codec_mode = ctx->codec->mode;
        ctx->colorspace = V4L2_COLORSPACE_REC709;
        ctx->params.framerate = 30;
-       ctx->aborting = 0;
 
        /* Default formats for output and input queues */
        ctx->q_data[V4L2_M2M_SRC].fourcc = ctx->codec->src_fourcc;
@@ -1144,6 +1143,7 @@ static void coda_stop_streaming(struct vb2_queue *q)
                kfifo_init(&ctx->bitstream_fifo,
                        ctx->bitstream.vaddr, ctx->bitstream.size);
                ctx->runcounter = 0;
+               ctx->aborting = 0;
        }
 }