media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap
authorEugen Hristev <eugen.hristev@microchip.com>
Tue, 3 May 2022 08:44:15 +0000 (10:44 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:21 +0000 (11:02 +0200)
In s_fmt_vid_cap, we should check if vb2_is_busy and return EBUSY,
not check if it's streaming to return the busy state.

Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/atmel/atmel-isc-base.c

index d2cc6c9..67b4a23 100644 (file)
@@ -1029,7 +1029,7 @@ static int isc_s_fmt_vid_cap(struct file *file, void *priv,
 {
        struct isc_device *isc = video_drvdata(file);
 
-       if (vb2_is_streaming(&isc->vb2_vidq))
+       if (vb2_is_busy(&isc->vb2_vidq))
                return -EBUSY;
 
        return isc_set_fmt(isc, f);