summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-12-31 08:47:07 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 10:45:26 -0200
commit115f418bfa7575fbd1422d7fd274a2425260beb2 (patch)
tree2ce249f699d355a850ef28fd71cd892aa531fe57
parent1516524ff299d803ff530495fd66b514ec962f75 (diff)
downloadop-kernel-dev-115f418bfa7575fbd1422d7fd274a2425260beb2.zip
op-kernel-dev-115f418bfa7575fbd1422d7fd274a2425260beb2.tar.gz
[media] pwc: Remove driver specific use of pixfmt.priv in the pwc driver
The .priv field never was intended for this, setting a framerate is support using the standardized S_PARM ioctl. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--Documentation/feature-removal-schedule.txt8
-rw-r--r--drivers/media/video/pwc/pwc-v4l.c23
2 files changed, 6 insertions, 25 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 11b925c..b7d96e1 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -469,14 +469,6 @@ Who: Hans de Goede <hdegoede@redhat.com>
----------------------------
-What: Driver specific use of pixfmt.priv in the pwc driver
-When: 3.3
-Why: The .priv field never was intended for this, setting a framerate is
- support using the standardized S_PARM ioctl
-Who: Hans de Goede <hdegoede@redhat.com>
-
-----------------------------
-
What: Software emulation of arbritary resolutions in the pwc driver
When: 3.3
Why: The pwc driver claims to support any resolution between 160x120
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c
index 566b09c..8b862b6 100644
--- a/drivers/media/video/pwc/pwc-v4l.c
+++ b/drivers/media/video/pwc/pwc-v4l.c
@@ -473,7 +473,7 @@ static int pwc_vidioc_try_fmt(struct pwc_device *pdev, struct v4l2_format *f)
static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
{
struct pwc_device *pdev = video_drvdata(file);
- int ret, fps, snapshot, compression, pixelformat;
+ int ret, pixelformat;
if (pwc_test_n_set_capt_file(pdev, file))
return -EBUSY;
@@ -483,16 +483,6 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
return ret;
pixelformat = f->fmt.pix.pixelformat;
- compression = pdev->vcompression;
- snapshot = 0;
- fps = pdev->vframes;
- if (f->fmt.pix.priv) {
- compression = (f->fmt.pix.priv & PWC_QLT_MASK) >> PWC_QLT_SHIFT;
- snapshot = !!(f->fmt.pix.priv & PWC_FPS_SNAPSHOT);
- fps = (f->fmt.pix.priv & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT;
- if (fps == 0)
- fps = pdev->vframes;
- }
if (pixelformat != V4L2_PIX_FMT_YUV420 &&
pixelformat != V4L2_PIX_FMT_PWC1 &&
@@ -511,9 +501,9 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
}
PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d "
- "compression=%d snapshot=%d format=%c%c%c%c\n",
- f->fmt.pix.width, f->fmt.pix.height, fps,
- compression, snapshot,
+ "compression=%d format=%c%c%c%c\n",
+ f->fmt.pix.width, f->fmt.pix.height, pdev->vframes,
+ pdev->vcompression,
(pixelformat)&255,
(pixelformat>>8)&255,
(pixelformat>>16)&255,
@@ -522,9 +512,8 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
ret = pwc_set_video_mode(pdev,
f->fmt.pix.width,
f->fmt.pix.height,
- fps,
- compression,
- snapshot);
+ pdev->vframes,
+ pdev->vcompression, 0);
PWC_DEBUG_IOCTL("pwc_set_video_mode(), return=%d\n", ret);
OpenPOWER on IntegriCloud