diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-02-18 16:38:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 15:33:39 -0300 |
commit | 561474c2d2a1e212ea186e0b65cc69fb330e7bd5 (patch) | |
tree | ff01d7c41345625982ec594fe80b85dfb73b0942 /drivers/media/video/uvc/uvc_ctrl.c | |
parent | 3653639e5daf2ac5f4763e4f1b6cb57538184be9 (diff) | |
download | kernel_samsung_smdk4412-561474c2d2a1e212ea186e0b65cc69fb330e7bd5.zip kernel_samsung_smdk4412-561474c2d2a1e212ea186e0b65cc69fb330e7bd5.tar.gz kernel_samsung_smdk4412-561474c2d2a1e212ea186e0b65cc69fb330e7bd5.tar.bz2 |
V4L/DVB: uvcvideo: Support menu controls in the control mapping API
The UVCIOC_CTRL_MAP ioctl doesn't support menu entries for menu
controls. As the uvc_xu_control_mapping structure has no reserved
fields, this can't be fixed while keeping ABI compatibility.
Modify the UVCIOC_CTRL_MAP ioctl to add menu entries support, and define
UVCIOC_CTRL_MAP_OLD that supports the old ABI without any ability to add
menu controls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_ctrl.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_ctrl.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 4e6d484..bd72100 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -1606,6 +1606,28 @@ void uvc_ctrl_cleanup_device(struct uvc_device *dev) } } +void uvc_ctrl_cleanup(void) +{ + struct uvc_control_info *info; + struct uvc_control_info *ni; + struct uvc_control_mapping *mapping; + struct uvc_control_mapping *nm; + + list_for_each_entry_safe(info, ni, &uvc_driver.controls, list) { + if (!(info->flags & UVC_CONTROL_EXTENSION)) + continue; + + list_for_each_entry_safe(mapping, nm, &info->mappings, list) { + list_del(&mapping->list); + kfree(mapping->menu_info); + kfree(mapping); + } + + list_del(&info->list); + kfree(info); + } +} + void uvc_ctrl_init(void) { struct uvc_control_info *ctrl = uvc_ctrls; |