Message ID | 20240610-billion-v2-6-38e861475f85@chromium.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | media: uvc: Probe PLF limits at start-up | expand |
Hi Ricardo, Thank you for the patch. On Mon, Jun 10, 2024 at 11:09:57PM +0000, Ricardo Ribalda wrote: > We do not have any quirk device making us of this. Remove from now. It > can be easily reverted later if needed. > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/usb/uvc/uvc_ctrl.c | 27 +-------------------------- > drivers/media/usb/uvc/uvcvideo.h | 1 - > 2 files changed, 1 insertion(+), 27 deletions(-) > > diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c > index d74019cb27fe..1c1710e3c486 100644 > --- a/drivers/media/usb/uvc/uvc_ctrl.c > +++ b/drivers/media/usb/uvc/uvc_ctrl.c > @@ -2679,32 +2679,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, > if (!ctrl->initialized) > return; > > - /* > - * First check if the device provides a custom mapping for this control, > - * used to override standard mappings for non-conformant devices. Don't > - * process standard mappings if a custom mapping is found. This > - * mechanism doesn't support combining standard and custom mappings for > - * a single control. > - */ > - if (chain->dev->info->mappings) { > - bool custom = false; > - > - for (i = 0; chain->dev->info->mappings[i]; ++i) { > - const struct uvc_control_mapping *mapping = > - chain->dev->info->mappings[i]; > - > - if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && > - ctrl->info.selector == mapping->selector) { > - __uvc_ctrl_add_mapping(chain, ctrl, mapping); > - custom = true; > - } > - } > - > - if (custom) > - return; > - } > - > - /* Process common mappings next. */ > + /* Process common mappings. */ > for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) { > const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i]; > > diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h > index 4df02a40c74f..ff9545dcf716 100644 > --- a/drivers/media/usb/uvc/uvcvideo.h > +++ b/drivers/media/usb/uvc/uvcvideo.h > @@ -527,7 +527,6 @@ struct uvc_device_info { > u32 quirks; > u32 meta_format; > u16 uvc_version; > - const struct uvc_control_mapping **mappings; > }; > > struct uvc_status_streaming {
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index d74019cb27fe..1c1710e3c486 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -2679,32 +2679,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, if (!ctrl->initialized) return; - /* - * First check if the device provides a custom mapping for this control, - * used to override standard mappings for non-conformant devices. Don't - * process standard mappings if a custom mapping is found. This - * mechanism doesn't support combining standard and custom mappings for - * a single control. - */ - if (chain->dev->info->mappings) { - bool custom = false; - - for (i = 0; chain->dev->info->mappings[i]; ++i) { - const struct uvc_control_mapping *mapping = - chain->dev->info->mappings[i]; - - if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && - ctrl->info.selector == mapping->selector) { - __uvc_ctrl_add_mapping(chain, ctrl, mapping); - custom = true; - } - } - - if (custom) - return; - } - - /* Process common mappings next. */ + /* Process common mappings. */ for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) { const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i]; diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h index 4df02a40c74f..ff9545dcf716 100644 --- a/drivers/media/usb/uvc/uvcvideo.h +++ b/drivers/media/usb/uvc/uvcvideo.h @@ -527,7 +527,6 @@ struct uvc_device_info { u32 quirks; u32 meta_format; u16 uvc_version; - const struct uvc_control_mapping **mappings; }; struct uvc_status_streaming {
We do not have any quirk device making us of this. Remove from now. It can be easily reverted later if needed. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- drivers/media/usb/uvc/uvc_ctrl.c | 27 +-------------------------- drivers/media/usb/uvc/uvcvideo.h | 1 - 2 files changed, 1 insertion(+), 27 deletions(-)