Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2105202pxf; Sat, 20 Mar 2021 04:45:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWnqiBZ1NpL1Kl5G6t6jHXcfBW6MeUIkUmY8V0M5PZnqhrxerrw0ZvUb1+Y6hfQvP+o8Ij X-Received: by 2002:a05:6402:1283:: with SMTP id w3mr15002647edv.340.1616240759081; Sat, 20 Mar 2021 04:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616240759; cv=none; d=google.com; s=arc-20160816; b=0CerVUW0y3VtEAfGuY+L8mvMmt6p3OT80gdqyJEMieauCtYJwop+rSIxbbmxNpmBW9 GtB/Vo1Snvm1yCGjIrxZSEnz/MOqrU7yR8m7MYsfygTSQeg7ts3E/57+9K7hSlG9tXsB lfPTt4aTpoVZIjQdxC+DpQM0sMax4sNsyXUr99hF1VAl4sYq/BzFyhX0GHSyjuagAslr JhRYNAZcINZ4ib4Otlhgh4QYc6CMzOLGQkTdjp5arHojmc0hxnscsuJCB5FShlk8Kza3 neJe/9cExHa+W1kSGbL5KCat8oXD8qO4j4vczCiClHvMAtDm1QiVePQF4925fhjldJFv hvuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=bpAArK+nDcnOESnhwHebWypeJwhDWWbnY325wdMTmBE=; b=x1uEJHpnBn43dNPg8N7QoPd/Uk8h2Uiz3xk+tEdi3kAXf7QyNwfQtZkc2wS1dy3s0O RKtvlrulloZqJotMiGiPRKdBSTw/KKcwbfEVT8Gg4Ddtk8ZDN2DgytgpfamSEMZ7p+1Z tCz3730XXGVPtgc+yiLOzn/K9tXIR2u6DbUwoY5NjoU8bkj10NgYE0IhxwRst1eDKpDW ogw2eFHk/8ULbtLZOrfRRnCOtg0WW3E3m/dIL41lok5U8hPVo3i3763S9+TTdT3oQyzS gWppIzwgNMjq1TFwoRv308+m8zweTyZoMBxtamgDIN9sFuUGKXSFcsrvcnPSc8eCH5DZ 1V1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=wYDQpJNG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h20si5814969edb.417.2021.03.20.04.45.37; Sat, 20 Mar 2021 04:45:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=wYDQpJNG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbhCTLoQ (ORCPT + 99 others); Sat, 20 Mar 2021 07:44:16 -0400 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:53457 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbhCTLnq (ORCPT ); Sat, 20 Mar 2021 07:43:46 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id NVzGldor64XAGNVzJlQ9Xs; Sat, 20 Mar 2021 08:25:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1616225134; bh=bpAArK+nDcnOESnhwHebWypeJwhDWWbnY325wdMTmBE=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=wYDQpJNGAicOhhV1XrL2OvUvW0tc0CpUGCSV5SANffL2elLBlBULXDw5T8eWXvI9w PRnsllB6OC3lthyY+IxzxCw5+FQJ1W/ry7jST9gDaRvNbkr18tL++b0Rs60SaRt5lr YJspX73lSBDvddp3avDl9PGY4zfMtMJlXyQpviqn8ODSKGuxLSf+DyeluSNVRldsaA +/AgxqU2oGO2haI/JityNpq7OIIJl/stpDCfq7qVgeKgrnYqlxG1OHeMUlDhUBKn+L BUIIYjIpQJ+fn41fj8bb9pi3UeSUtBevPuaTmTDsIS/vF52XnOlLzJrE0cdMFnXbWU Z3wtSXNGQSkRA== Subject: Re: [PATCH v8 05/19] media: uvcvideo: Remove s_ctrl and g_ctrl To: Ricardo Ribalda , Laurent Pinchart , Mauro Carvalho Chehab , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org References: <20210319170906.278238-1-ribalda@chromium.org> <20210319170906.278238-6-ribalda@chromium.org> From: Hans Verkuil Message-ID: Date: Sat, 20 Mar 2021 08:25:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210319170906.278238-6-ribalda@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfF+/alibnzOlOh/P7sSBxojv6+RjGuzrKbhngbCujSZMk3bXBhtpAq+ARJVQ5ye60HqeJJO3lmYTYUE/0RzZdS60COx5YQtJYTmp1sGqLb6+YbtLOVT3 +MZhWdi0OFYuLT4MSIjaYu3EIj7P7x0aRsoagulUk1At2i/NefQ7hS0nBLc0ELv1BrPztwXAgZ2Yv5GlKhH0is5F2vccx/Uy45u2DH41XUVH4DFEA3rnD83n fOJV3xMxmzFfbkbFpon2pnqme4l5zg4woNDd2xydp35GDHYyDtFp8BOwEEl78eewM+LVfbM0lTJU+qVj6Xv+roptJvef67DnwRDd4x1THwAmVKgE+P3t7pgm OP8TVq4ojkfsbMuSeZI3BXbVF0WlBb0pRRThYWvUeZfU9qyoiM33R7XJBOAld1fdvyvoAqmW Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/2021 18:08, Ricardo Ribalda wrote: > If we do not implement these callback the framework will call the ext_ctrl > callbaks instead, which are a superset of this functions. callbaks -> callbacks With that changed you can add my: Reviewed-by: Hans Verkuil Regards, Hans > > Suggested-by: Hans Verkuil > Signed-off-by: Ricardo Ribalda > --- > drivers/media/usb/uvc/uvc_v4l2.c | 56 -------------------------------- > 1 file changed, 56 deletions(-) > > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c > index 47b0e3224205..ac98869d5a05 100644 > --- a/drivers/media/usb/uvc/uvc_v4l2.c > +++ b/drivers/media/usb/uvc/uvc_v4l2.c > @@ -983,60 +983,6 @@ static int uvc_ioctl_query_ext_ctrl(struct file *file, void *fh, > return 0; > } > > -static int uvc_ioctl_g_ctrl(struct file *file, void *fh, > - struct v4l2_control *ctrl) > -{ > - struct uvc_fh *handle = fh; > - struct uvc_video_chain *chain = handle->chain; > - struct v4l2_ext_control xctrl; > - int ret; > - > - memset(&xctrl, 0, sizeof(xctrl)); > - xctrl.id = ctrl->id; > - > - ret = uvc_ctrl_begin(chain); > - if (ret < 0) > - return ret; > - > - ret = uvc_ctrl_get(chain, &xctrl); > - uvc_ctrl_rollback(handle); > - if (ret < 0) > - return ret; > - > - ctrl->value = xctrl.value; > - return 0; > -} > - > -static int uvc_ioctl_s_ctrl(struct file *file, void *fh, > - struct v4l2_control *ctrl) > -{ > - struct uvc_fh *handle = fh; > - struct uvc_video_chain *chain = handle->chain; > - struct v4l2_ext_control xctrl; > - int ret; > - > - memset(&xctrl, 0, sizeof(xctrl)); > - xctrl.id = ctrl->id; > - xctrl.value = ctrl->value; > - > - ret = uvc_ctrl_begin(chain); > - if (ret < 0) > - return ret; > - > - ret = uvc_ctrl_set(handle, &xctrl); > - if (ret < 0) { > - uvc_ctrl_rollback(handle); > - return ret; > - } > - > - ret = uvc_ctrl_commit(handle, &xctrl, 1); > - if (ret < 0) > - return ret; > - > - ctrl->value = xctrl.value; > - return 0; > -} > - > static int uvc_ioctl_g_ext_ctrls(struct file *file, void *fh, > struct v4l2_ext_controls *ctrls) > { > @@ -1522,8 +1468,6 @@ const struct v4l2_ioctl_ops uvc_ioctl_ops = { > .vidioc_s_input = uvc_ioctl_s_input, > .vidioc_queryctrl = uvc_ioctl_queryctrl, > .vidioc_query_ext_ctrl = uvc_ioctl_query_ext_ctrl, > - .vidioc_g_ctrl = uvc_ioctl_g_ctrl, > - .vidioc_s_ctrl = uvc_ioctl_s_ctrl, > .vidioc_g_ext_ctrls = uvc_ioctl_g_ext_ctrls, > .vidioc_s_ext_ctrls = uvc_ioctl_s_ext_ctrls, > .vidioc_try_ext_ctrls = uvc_ioctl_try_ext_ctrls, >