diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-06-30 19:47:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 07:14:55 -0300 |
commit | 50a871fed9c82f01baa40100cd2d262784220953 (patch) | |
tree | 8bc1ba94cd7c479cd553a68237442f57da6245c3 /drivers/media/video/gspca/gspca.c | |
parent | 6a7eba24e4f0ff725d33159f6265e3a79d53a833 (diff) | |
download | lwn-50a871fed9c82f01baa40100cd2d262784220953.tar.gz lwn-50a871fed9c82f01baa40100cd2d262784220953.zip |
V4L/DVB (8158): gspca: minor changes
main: V4L2_PIX_FMT_SPCA501 is compressed (thanks to Hans de Goede)
main: return 0 when no change on vidioc_s_fmt_cap (thanks to Hans de Goede)
pac207: cleanup
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 5583c53e4863..07d765a7de6f 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -316,6 +316,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; @@ -369,12 +370,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; } @@ -913,8 +914,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; |