summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/gspca/gspca.c')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index f39945c40..12639413c 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -322,6 +322,7 @@ static int gspca_is_compressed(__u32 format)
switch (format) {
case V4L2_PIX_FMT_MJPEG:
case V4L2_PIX_FMT_JPEG:
+ case V4L2_PIX_FMT_SPCA561:
return 1;
}
return 0;
@@ -375,12 +376,12 @@ static __u32 get_v4l2_depth(__u32 pixfmt)
case V4L2_PIX_FMT_YYUV: /* 'YYUV' */
return 16;
case V4L2_PIX_FMT_YUV420: /* 'YU12' planar 4.2.0 */
+ case V4L2_PIX_FMT_SPCA501: /* 'S501' YUYV per line */
return 12;
case V4L2_PIX_FMT_MJPEG:
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_SBGGR8: /* 'BA81' Bayer */
case V4L2_PIX_FMT_SN9C10X: /* 'S910' SN9C10x compression */
- case V4L2_PIX_FMT_SPCA501: /* 'S501' YUYV per line */
case V4L2_PIX_FMT_SPCA561: /* 'S561' compressed BGGR bayer */
return 8;
}
@@ -919,8 +920,10 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,
goto out;
}
- if (ret == gspca_dev->curr_mode)
+ if (ret == gspca_dev->curr_mode) {
+ ret = 0;
goto out; /* same mode */
+ }
if (gspca_dev->streaming) {
ret = -EBUSY;