Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp525118pxf; Wed, 17 Mar 2021 09:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwejr5BN48dLV/xaeL4lH4h4iGBFGwkmgK5G6EJRtR45D29WdQDZwbgA5guEf/n1lYLR6Jg X-Received: by 2002:a17:906:ad85:: with SMTP id la5mr36386579ejb.37.1615999613388; Wed, 17 Mar 2021 09:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615999613; cv=none; d=google.com; s=arc-20160816; b=HXLpyetkkYgtZ+c3NxRDa055Va1LpvHyxqD5YqoEamxwcybntJB1AIWHJlDLYcxok/ 4Ti1lye7ShUBtSqPWOoOHxJVFUjyJSyQ6VnOvJBb2J1h5gv+cuet4PEKq9GkeBRpco/m /8OX2oKPgatb/flQBBFEomk2brLi8tKXOP+80/Hglajsqf+sfc+cYuCABbraWR9hMf+N DnaFuetHu27hjbXLib/inP+4MQzSEYlnymabAI5dm8efOieAySfTKIroAKLpQTmmMEYr FewG0rEE4zxV8oJoIuzICmNc4eG8bJkcDN5nTysYFNyoeudpvz0cDNRDyuufAh1PHu1K y1Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rJ5EJL/W7wsb3M0P1LQ5UiKCaTfkRQ52nO+/XL2VvZw=; b=RO8fP4S1BDESc6zV32M499ZwDzItEu8K5VJxW5ow6TFsNmAy2sqfyGncdVc79QakQY w6gG/NBFFhS2Pv00w5mq6n/2SoIiQlLaRHHeUzFf2j1ByifuRIAYCt2wYageKoKG0YaA 8wTaKxSG/v2vR/BIVl/ZkqL62grO823R2Ip1+mU/mcLX8CbYojLE5LmQqXnw93h188GF NDvLhIqmivc7oQRBxTaFe/sAbu7+o8DXiTnHuYfIpIs9sn9HzKqzWJJLHoztk2wP8m6C DKrnhZdUb+XmewKyxizI1ri74xbWFvUMO54NlhbuMxQLwgJqKTdGlq59NkbI2amKjwp+ MMuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X0W44EYg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si16074311ejr.620.2021.03.17.09.46.30; Wed, 17 Mar 2021 09:46:53 -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=@chromium.org header.s=google header.b=X0W44EYg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232656AbhCQQpk (ORCPT + 99 others); Wed, 17 Mar 2021 12:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232647AbhCQQpT (ORCPT ); Wed, 17 Mar 2021 12:45:19 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025E1C06175F for ; Wed, 17 Mar 2021 09:45:19 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id r17so3648139ejy.13 for ; Wed, 17 Mar 2021 09:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rJ5EJL/W7wsb3M0P1LQ5UiKCaTfkRQ52nO+/XL2VvZw=; b=X0W44EYgx8AezDHtB76FgGrfbV62VvK7RauGP6H+Sbzm83YV/cdCEigYPuWiaE/gDs bO4dmle5eFCLGlE9uOm3afo5vGgg2uPnKV4D4Jl6BXcgiIqwtlP7gvPq3BrH9nOD4DXS FtkmBbPuXmyQi+h5KhJRxr1/oKZE9QvvEPfEM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rJ5EJL/W7wsb3M0P1LQ5UiKCaTfkRQ52nO+/XL2VvZw=; b=Z4srNxiHYQg11vY2u5B/emyjlopS6Baj8QzvZh3MOHnIEMsZ3L8O9WR0VyrhslT984 klzuydzjZE1nGAlo9jIbz/9MYtW2WBv0eXxf9Kt20zN5z1dnDTMhCqlZB4XBwlP2KP19 e8pgCi2aFTP8SQus2taAKMDkZ5Z/48czUrRZfTMIW4C6X/9Xwybg6lnFOx4ibVKLEvEY iSljdUjRkPaoPdeCKhDb60ast05saI1/9jfJwxcvybQuPHppwHS5+mAEWigoaGLIZ572 tRP+tJnEViY/eRRjBCntCAczlII21PORdEgCOeq4/bn5UDRNFbZEM9ZzF5/IdQZwEmcD 337A== X-Gm-Message-State: AOAM530H6cib0qxNgy8guoZJTkhmYXtDjXZ8QFQPsbvBCDFM46XZNCuy Svzh0CKl26Pc/dNwa8VQG5NqAA== X-Received: by 2002:a17:906:f0c8:: with SMTP id dk8mr36730843ejb.300.1615999517821; Wed, 17 Mar 2021 09:45:17 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id hy25sm12088128ejc.119.2021.03.17.09.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 09:45:17 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v6 06/17] media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL Date: Wed, 17 Mar 2021 17:45:00 +0100 Message-Id: <20210317164511.39967-7-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210317164511.39967-1-ribalda@chromium.org> References: <20210317164511.39967-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is written. Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_v4l2.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 252136cc885c..47b0e3224205 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -1089,10 +1089,6 @@ static int uvc_ioctl_s_try_ext_ctrls(struct uvc_fh *handle, unsigned int i; int ret; - /* Default value cannot be changed */ - if (ctrls->which == V4L2_CTRL_WHICH_DEF_VAL) - return -EINVAL; - ret = uvc_ctrl_begin(chain); if (ret < 0) return ret; -- 2.31.0.rc2.261.g7f71774620-goog