@@ -722,20 +722,18 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = {
},
};
-const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11 = {
- .id = V4L2_CID_POWER_LINE_FREQUENCY,
- .entity = UVC_GUID_UVC_PROCESSING,
- .selector = UVC_PU_POWER_LINE_FREQUENCY_CONTROL,
- .size = 2,
- .offset = 0,
- .v4l2_type = V4L2_CTRL_TYPE_MENU,
- .data_type = UVC_CTRL_DATA_TYPE_ENUM,
- .menu_info = power_line_frequency_controls,
- .menu_mask = BIT_MASK(ARRAY_SIZE(power_line_frequency_controls) - 1),
-};
-
static const struct uvc_control_mapping uvc_ctrl_mappings_uvc11[] = {
- uvc_ctrl_power_line_mapping_uvc11,
+ {
+ .id = V4L2_CID_POWER_LINE_FREQUENCY,
+ .entity = UVC_GUID_UVC_PROCESSING,
+ .selector = UVC_PU_POWER_LINE_FREQUENCY_CONTROL,
+ .size = 2,
+ .offset = 0,
+ .v4l2_type = V4L2_CTRL_TYPE_MENU,
+ .data_type = UVC_CTRL_DATA_TYPE_ENUM,
+ .menu_info = power_line_frequency_controls,
+ .menu_mask = BIT_MASK(ARRAY_SIZE(power_line_frequency_controls) - 1),
+ },
};
static const struct uvc_control_mapping uvc_ctrl_mappings_uvc15[] = {
@@ -2378,13 +2378,6 @@ MODULE_PARM_DESC(timeout, "Streaming control requests timeout");
* Driver initialization and cleanup
*/
-static const struct uvc_device_info uvc_ctrl_power_line_uvc11 = {
- .mappings = (const struct uvc_control_mapping *[]) {
- &uvc_ctrl_power_line_mapping_uvc11,
- NULL, /* Sentinel */
- },
-};
-
static const struct uvc_menu_info power_line_frequency_controls_limited[] = {
{ 1, "50 Hz" },
{ 2, "60 Hz" },
@@ -2988,15 +2981,6 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_QUIRK(UVC_QUIRK_FORCE_BPP) },
- /* Lenovo Integrated Camera */
- { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
- | USB_DEVICE_ID_MATCH_INT_INFO,
- .idVendor = 0x30c9,
- .idProduct = 0x0093,
- .bInterfaceClass = USB_CLASS_VIDEO,
- .bInterfaceSubClass = 1,
- .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
- .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 },
/* Sonix Technology USB 2.0 Camera */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
@@ -747,7 +747,6 @@ int uvc_status_start(struct uvc_device *dev, gfp_t flags);
void uvc_status_stop(struct uvc_device *dev);
/* Controls */
-extern const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11;
extern const struct v4l2_subscribed_event_ops uvc_ctrl_sub_ev_ops;
int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
This reverts commit fb1316b0ff3fc3cd98637040ee17ab7be753aac7. As today, the minimum version of GCC required to build the kernel is 5.1, which does not support static const structure initialization. Error: drivers/media/usb/uvc/uvc_ctrl.c:737:2: error: initializer element is not a compile-time constant Fixes: fb1316b0ff3f ("media: uvcvideo: Fix power line control for Lenovo Integrated Camera") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> --- drivers/media/usb/uvc/uvc_ctrl.c | 24 +++++++++++------------- drivers/media/usb/uvc/uvc_driver.c | 16 ---------------- drivers/media/usb/uvc/uvcvideo.h | 1 - 3 files changed, 11 insertions(+), 30 deletions(-)