Commit 1dc8ddfd5a27706e54f16812c4197bb8be8ab9c1

Authored by Laurent Pinchart
Committed by Mauro Carvalho Chehab
1 parent fe78d187fe

[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>

Showing 2 changed files with 44 additions and 2 deletions Side-by-side Diff

Documentation/feature-removal-schedule.txt
... ... @@ -580,4 +580,27 @@
580 580 Who: Jean Delvare <khali@linux-fr.org>
581 581  
582 582 ----------------------------
  583 +
  584 +What: Support for UVCIOC_CTRL_ADD in the uvcvideo driver
  585 +When: 2.6.42
  586 +Why: The information passed to the driver by this ioctl is now queried
  587 + dynamically from the device.
  588 +Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  589 +
  590 +----------------------------
  591 +
  592 +What: Support for UVCIOC_CTRL_MAP_OLD in the uvcvideo driver
  593 +When: 2.6.42
  594 +Why: Used only by applications compiled against older driver versions.
  595 + Superseded by UVCIOC_CTRL_MAP which supports V4L2 menu controls.
  596 +Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  597 +
  598 +----------------------------
  599 +
  600 +What: Support for UVCIOC_CTRL_GET and UVCIOC_CTRL_SET in the uvcvideo driver
  601 +When: 2.6.42
  602 +Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
  603 +Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  604 +
  605 +----------------------------
drivers/media/video/uvc/uvc_v4l2.c
... ... @@ -538,6 +538,20 @@
538 538 return 0;
539 539 }
540 540  
  541 +static void uvc_v4l2_ioctl_warn(void)
  542 +{
  543 + static int warned;
  544 +
  545 + if (warned)
  546 + return;
  547 +
  548 + uvc_printk(KERN_INFO, "Deprecated UVCIOC_CTRL_{ADD,MAP_OLD,GET,SET} "
  549 + "ioctls will be removed in 2.6.42.\n");
  550 + uvc_printk(KERN_INFO, "See http://www.ideasonboard.org/uvc/upgrade/ "
  551 + "for upgrade instructions.\n");
  552 + warned = 1;
  553 +}
  554 +
541 555 static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
542 556 {
543 557 struct video_device *vdev = video_devdata(file);
544 558  
545 559  
... ... @@ -1018,12 +1032,16 @@
1018 1032 uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd);
1019 1033 return -EINVAL;
1020 1034  
1021   - /* Dynamic controls. */
  1035 + /* Dynamic controls. UVCIOC_CTRL_ADD, UVCIOC_CTRL_MAP_OLD,
  1036 + * UVCIOC_CTRL_GET and UVCIOC_CTRL_SET are deprecated and scheduled for
  1037 + * removal in 2.6.42.
  1038 + */
1022 1039 case UVCIOC_CTRL_ADD:
1023   - /* Legacy ioctl, kept for API compatibility reasons */
  1040 + uvc_v4l2_ioctl_warn();
1024 1041 return -EEXIST;
1025 1042  
1026 1043 case UVCIOC_CTRL_MAP_OLD:
  1044 + uvc_v4l2_ioctl_warn();
1027 1045 case UVCIOC_CTRL_MAP:
1028 1046 return uvc_ioctl_ctrl_map(chain, arg,
1029 1047 cmd == UVCIOC_CTRL_MAP_OLD);
... ... @@ -1041,6 +1059,7 @@
1041 1059 .data = xctrl->data,
1042 1060 };
1043 1061  
  1062 + uvc_v4l2_ioctl_warn();
1044 1063 return uvc_xu_ctrl_query(chain, &xqry);
1045 1064 }
1046 1065