aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-misc.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-09-12 16:05:11 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:05:57 -0400
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 589c687439da..6af5bb538358 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)
47 you don't have the decompressor loaded or use RAW mode, 47 you don't have the decompressor loaded or use RAW mode,
48 the maximum viewable size is smaller. 48 the maximum viewable size is smaller.
49 */ 49 */
50 if (pdev->vpalette == VIDEO_PALETTE_RAW) 50 if (pdev->pixfmt != V4L2_PIX_FMT_YUV420)
51 { 51 {
52 if (width > pdev->abs_max.x || height > pdev->abs_max.y) 52 if (width > pdev->abs_max.x || height > pdev->abs_max.y)
53 { 53 {
@@ -123,7 +123,7 @@ void pwc_construct(struct pwc_device *pdev)
123 pdev->frame_header_size = 0; 123 pdev->frame_header_size = 0;
124 pdev->frame_trailer_size = 0; 124 pdev->frame_trailer_size = 0;
125 } 125 }
126 pdev->vpalette = VIDEO_PALETTE_YUV420P; /* default */ 126 pdev->pixfmt = V4L2_PIX_FMT_YUV420; /* default */
127 pdev->view_min.size = pdev->view_min.x * pdev->view_min.y; 127 pdev->view_min.size = pdev->view_min.x * pdev->view_min.y;
128 pdev->view_max.size = pdev->view_max.x * pdev->view_max.y; 128 pdev->view_max.size = pdev->view_max.x * pdev->view_max.y;
129 /* length of image, in YUV format; always allocate enough memory. */ 129 /* length of image, in YUV format; always allocate enough memory. */