From patchwork Wed Mar 17 16:44:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 403556 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 774C3C433DB for ; Wed, 17 Mar 2021 16:46:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36A1464F2B for ; Wed, 17 Mar 2021 16:46:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232574AbhCQQpf (ORCPT ); Wed, 17 Mar 2021 12:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232634AbhCQQpS (ORCPT ); Wed, 17 Mar 2021 12:45:18 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F876C06175F for ; Wed, 17 Mar 2021 09:45:18 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id b16so3090345eds.7 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=fA/68we/kMTkpnR4AV+szAmiaqsAOldil+kVUGgOjPk=; b=ACrBLyE45qWrT36JGCDQtAW5B4J7WvzPgUK05OiqZsFebHLAGq1PYx9yRpSJ+a5is8 U6Y0bnResftXQNuiKoga6lM35wXJdOnXOhoMxzieghxNB5/DypnXWlekR2Y9dVt0lXsZ bfQh7LbxGT76zH8kM5o3/QjK9M20vBGhdWnkk= 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=fA/68we/kMTkpnR4AV+szAmiaqsAOldil+kVUGgOjPk=; b=LnhG3YzM2vfP3kLAZ8SiyepI8lEv0Mbu3qvHABzw5Ca0ejvgW3/BNDLkcXi7gfNLOw Ae5MC4/4TemQLCWrMH1TNcPCnLHmCqjwpKa94iDl7sYv8KpDOyZpYRHKHVs19npzTDvg 2XIQuzYYqVDzeUqyYbvT0QucR2eUAcUZ3S/6oIfejNj7GeZWup4Ii8TfkO3TXvBHyBQw BjB+DqLnxrqah6lzePdiMAEnCGeRtXvkiltjBYZbGiIUCfRcR/i4gajS2QF3O4SY+6oG Zd68xXCwnatGLdr9Ce5g7dNzGLq7E8efmVQz/qL+M7WtpR91gERdtiS4GZ+a6wEyiwvR Bh+Q== X-Gm-Message-State: AOAM532VMzG9s17bc3xDCsu1Y/VaAhHdGZLcCHs5sMbKZGyyX2iE7W93 TGBBMzp5CpSLr+PHadyupcipTg== X-Google-Smtp-Source: ABdhPJzzRFU4N/D1uk69rbftkzPmtne0jexST67hsnCQIyylvEhXLIX8IpVRkn+ieBP8eKcrnphySA== X-Received: by 2002:aa7:cf17:: with SMTP id a23mr44276595edy.30.1615999517240; 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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 09:45:16 -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 , Mike Isely Subject: [PATCH v6 05/17] media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL Date: Wed, 17 Mar 2021 17:44:59 +0100 Message-Id: <20210317164511.39967-6-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 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is written. Cc: Mike Isely Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil --- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 9657c1883311..c04ab7258d64 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -640,10 +640,6 @@ static int pvr2_s_ext_ctrls(struct file *file, void *priv, unsigned int idx; int ret; - /* Default value cannot be changed */ - if (ctls->which == V4L2_CTRL_WHICH_DEF_VAL) - return -EINVAL; - ret = 0; for (idx = 0; idx < ctls->count; idx++) { ctrl = ctls->controls + idx;