media: bcm2835-unicam: Do not stop streaming in unicam_release
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 29 Apr 2020 21:05:09 +0000 (22:05 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:54 +0000 (16:33 +0100)
unicam_release calls _vb2_fop_release, which will call stop_streaming
if that particular node was streaming. Calling it unconditionally (as
the code was) means that if a second handle was opened eg to alter
a setting, on closing that connection it also stopped Unicam.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/media/platform/bcm2835/bcm2835-unicam.c

index f94a790..e7c0e91 100644 (file)
@@ -2204,9 +2204,6 @@ static int unicam_release(struct file *file)
        if (fh_singular)
                v4l2_subdev_call(sd, core, s_power, 0);
 
-       if (node->streaming)
-               unicam_stop_streaming(&node->buffer_queue);
-
        node->open--;
        mutex_unlock(&node->lock);