summaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-10-12 12:11:30 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 09:30:31 -0300
commit1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1 (patch)
treed6d2e47d928b28c8478934d3b4cf8e3f26d5b6fd /drivers/media/video
parentfe78d187fe792fac5d190b19a2806c23df28891e (diff)
downloadop-kernel-dev-1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1.zip
op-kernel-dev-1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1.tar.gz
[media] uvcvideo: Deprecate UVCIOC_CTRL_{ADD,MAP_OLD,GET,SET}
Those ioctls are deprecated, list them in the features removal schedule for 2.6.42. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index 7432336..2e2a556 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -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);
@@ -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);
@@ -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);
}
OpenPOWER on IntegriCloud