Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250264
b: refs/heads/master
c: 1dc8ddf
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 8f2efea commit 5ca9c03
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe78d187fe792fac5d190b19a2806c23df28891e
refs/heads/master: 1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1
23 changes: 23 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -580,3 +580,26 @@ Why: These legacy callbacks should no longer be used as i2c-core offers
Who: Jean Delvare <khali@linux-fr.org>

----------------------------

What: Support for UVCIOC_CTRL_ADD in the uvcvideo driver
When: 2.6.42
Why: The information passed to the driver by this ioctl is now queried
dynamically from the device.
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

----------------------------

What: Support for UVCIOC_CTRL_MAP_OLD in the uvcvideo driver
When: 2.6.42
Why: Used only by applications compiled against older driver versions.
Superseded by UVCIOC_CTRL_MAP which supports V4L2 menu controls.
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

----------------------------

What: Support for UVCIOC_CTRL_GET and UVCIOC_CTRL_SET in the uvcvideo driver
When: 2.6.42
Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

----------------------------
23 changes: 21 additions & 2 deletions trunk/drivers/media/video/uvc/uvc_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,20 @@ static int uvc_v4l2_release(struct file *file)
return 0;
}

static void uvc_v4l2_ioctl_warn(void)
{
static int warned;

if (warned)
return;

uvc_printk(KERN_INFO, "Deprecated UVCIOC_CTRL_{ADD,MAP_OLD,GET,SET} "
"ioctls will be removed in 2.6.42.\n");
uvc_printk(KERN_INFO, "See http://www.ideasonboard.org/uvc/upgrade/ "
"for upgrade instructions.\n");
warned = 1;
}

static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
struct video_device *vdev = video_devdata(file);
Expand Down Expand Up @@ -1018,12 +1032,16 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd);
return -EINVAL;

/* Dynamic controls. */
/* Dynamic controls. UVCIOC_CTRL_ADD, UVCIOC_CTRL_MAP_OLD,
* UVCIOC_CTRL_GET and UVCIOC_CTRL_SET are deprecated and scheduled for
* removal in 2.6.42.
*/
case UVCIOC_CTRL_ADD:
/* Legacy ioctl, kept for API compatibility reasons */
uvc_v4l2_ioctl_warn();
return -EEXIST;

case UVCIOC_CTRL_MAP_OLD:
uvc_v4l2_ioctl_warn();
case UVCIOC_CTRL_MAP:
return uvc_ioctl_ctrl_map(chain, arg,
cmd == UVCIOC_CTRL_MAP_OLD);
Expand All @@ -1041,6 +1059,7 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
.data = xctrl->data,
};

uvc_v4l2_ioctl_warn();
return uvc_xu_ctrl_query(chain, &xqry);
}

Expand Down

0 comments on commit 5ca9c03

Please sign in to comment.