]> www.infradead.org Git - linux.git/commitdiff
usb: gadget: uvc: Remove the hardcoded default color matching
authorDaniel Scally <dan.scally@ideasonboard.com>
Thu, 2 Feb 2023 11:41:40 +0000 (11:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 12:46:42 +0000 (13:46 +0100)
A hardcoded default color matching descriptor is embedded in struct
f_uvc_opts but no longer has any use - remove it.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Link: https://lore.kernel.org/r/20230202114142.300858-5-dan.scally@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_uvc.c
drivers/usb/gadget/function/u_uvc.h

index 5250805153c70446d6d22c8ea1b7f6f0e4ad9780..835e121a806f415b71441496bcc4661d57158c53 100644 (file)
@@ -817,7 +817,6 @@ static struct usb_function_instance *uvc_alloc_inst(void)
        struct uvc_camera_terminal_descriptor *cd;
        struct uvc_processing_unit_descriptor *pd;
        struct uvc_output_terminal_descriptor *od;
-       struct uvc_color_matching_descriptor *md;
        struct uvc_descriptor_header **ctl_cls;
        int ret;
 
@@ -866,14 +865,6 @@ static struct usb_function_instance *uvc_alloc_inst(void)
        od->bSourceID                   = 2;
        od->iTerminal                   = 0;
 
-       md = &opts->uvc_color_matching;
-       md->bLength                     = UVC_DT_COLOR_MATCHING_SIZE;
-       md->bDescriptorType             = USB_DT_CS_INTERFACE;
-       md->bDescriptorSubType          = UVC_VS_COLORFORMAT;
-       md->bColorPrimaries             = 1;
-       md->bTransferCharacteristics    = 1;
-       md->bMatrixCoefficients         = 4;
-
        /* Prepare fs control class descriptors for configfs-based gadgets */
        ctl_cls = opts->uvc_fs_control_cls;
        ctl_cls[0] = NULL;      /* assigned elsewhere by configfs */
index 9d15bc2c70451596c86289d963df339220d91df6..67cf319e9c2de0ebec87a5eb9d768196e2ea5779 100644 (file)
@@ -54,7 +54,6 @@ struct f_uvc_opts {
        struct uvc_camera_terminal_descriptor           uvc_camera_terminal;
        struct uvc_processing_unit_descriptor           uvc_processing;
        struct uvc_output_terminal_descriptor           uvc_output_terminal;
-       struct uvc_color_matching_descriptor            uvc_color_matching;
 
        /*
         * Control descriptors pointers arrays for full-/high-speed and