media: vimc: stream: cleanup frame field from struct vimc_stream
authorHelen Fornazier <helen.koike@collabora.com>
Wed, 6 Mar 2019 22:42:41 +0000 (17:42 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 19:41:33 +0000 (15:41 -0400)
There is no need to have the frame field in the vimc_stream struct.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Tested-by: André Almeida <andre.almeida@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vimc/vimc-streamer.c
drivers/media/platform/vimc/vimc-streamer.h

index 392754c18046cb0ac8b4285ae653f59e23aff5a3..b7c1fdef5f0dd7cf629000ac07032354ae5e88d3 100644 (file)
@@ -117,6 +117,7 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
 static int vimc_streamer_thread(void *data)
 {
        struct vimc_stream *stream = data;
+       u8 *frame = NULL;
        int i;
 
        set_freezable();
@@ -127,12 +128,9 @@ static int vimc_streamer_thread(void *data)
                        break;
 
                for (i = stream->pipe_size - 1; i >= 0; i--) {
-                       stream->frame = stream->ved_pipeline[i]->process_frame(
-                                       stream->ved_pipeline[i],
-                                       stream->frame);
-                       if (!stream->frame)
-                               break;
-                       if (IS_ERR(stream->frame))
+                       frame = stream->ved_pipeline[i]->process_frame(
+                                       stream->ved_pipeline[i], frame);
+                       if (!frame || IS_ERR(frame))
                                break;
                }
                //wait for 60hz
index 752af2e2d5a21ff9abda60c4376786eee6075d08..dc1d0be431cb5abfcb9e3db89f5e256121497db2 100644 (file)
@@ -19,7 +19,6 @@ struct vimc_stream {
        struct media_pipeline pipe;
        struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
        unsigned int pipe_size;
-       u8 *frame;
        struct task_struct *kthread;
 };