summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-misc.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-09-12 17:05:11 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 01:05:57 -0200
commit479567ce3af7b99d645a3c53b8ca2fc65e46efdc (patch)
treed16fd87d5eec337c82fd195cd03ed301e883b68f /drivers/media/video/pwc/pwc-misc.c
parenta1de2e4b72f27b906cb2eea3003fd62377dbf5ea (diff)
V4L/DVB: pwc: fully convert driver to V4L2
Remove the V4L1 API from this driver, making it fully V4L2. Also fix a bug where the /dev/videoX device was created too early, which led to initialization problems of the camera, making it unable to capture video. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-misc.c')
-rw-r--r--drivers/media/video/pwc/pwc-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/pwc/pwc-misc.c b/drivers/media/video/pwc/pwc-misc.c
index 589c687439d..6af5bb53835 100644
--- a/drivers/media/video/pwc/pwc-misc.c
+++ b/drivers/media/video/pwc/pwc-misc.c
@@ -47,7 +47,7 @@ int pwc_decode_size(struct pwc_device *pdev, int width, int height)
you don't have the decompressor loaded or use RAW mode,
the maximum viewable size is smaller.
*/
- if (pdev->vpalette == VIDEO_PALETTE_RAW)
+ if (pdev->pixfmt != V4L2_PIX_FMT_YUV420)
{
if (width > pdev->abs_max.x || height > pdev->abs_max.y)
{
@@ -123,7 +123,7 @@ void pwc_construct(struct pwc_device *pdev)
pdev->frame_header_size = 0;
pdev->frame_trailer_size = 0;
}
- pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */
+ pdev->pixfmt = V4L2_PIX_FMT_YUV420; /* default */
pdev->view_min.size = pdev->view_min.x * pdev->view_min.y;
pdev->view_max.size = pdev->view_max.x * pdev->view_max.y;
/* length of image, in YUV format; always allocate enough memory. */