From patchwork Fri Mar 20 13:30:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 6056601 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D31E8BF90F for ; Fri, 20 Mar 2015 13:31:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FAE8204E3 for ; Fri, 20 Mar 2015 13:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3070A204EC for ; Fri, 20 Mar 2015 13:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbbCTNbH (ORCPT ); Fri, 20 Mar 2015 09:31:07 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:36346 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbbCTNax (ORCPT ); Fri, 20 Mar 2015 09:30:53 -0400 Received: by labe2 with SMTP id e2so11694007lab.3; Fri, 20 Mar 2015 06:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=cFZ8Y4boqVb2k/NQnr1AkSNsYm5FoQ2VLSxJ76AY67k=; b=YqVVeeyzvxgSEOsvbCrp0WOta9PEtHNganRU8NASi2vpv7NMP1MjVFJA2elqUjFTIF Jdr+sozTaMHhIpsfaic8hnzadFbOA2vBQnF/1EqJFy4vYFald7yIfxE/yHcrAo1PSZCt XPDhuxSQtlrwNmf8vb00OC5nVShv3hvVJPEauLhDk2S4uB0ytQDD9qWMbmvZocYJW1k+ JazLS2HRCWalNhNcfk+AJdIeciPpUA8skLwlQaE6yt74JVdvhhFVVN1DSI4AG4ELNpNy Xc9Wl6Ye04mjfYy/1rmC19n6AurofhBLmoLqVcOLastZdNlqqBHJ5BY19YQSBOVt0s7M Y/Zg== X-Received: by 10.152.219.2 with SMTP id pk2mr72089198lac.107.1426858251198; Fri, 20 Mar 2015 06:30:51 -0700 (PDT) Received: from neopili.fritz.box (cpe.xe-3-0-1-778.vbrnqe10.dk.customer.tdc.net. [80.197.57.18]) by mx.google.com with ESMTPSA id lv11sm934808lac.38.2015.03.20.06.30.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 06:30:50 -0700 (PDT) From: Ricardo Ribalda Delgado To: Ricardo Ribalda Delgado , Hans Verkuil , Mauro Carvalho Chehab , Arun Kumar K , Sylwester Nawrocki , Antti Palosaari , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Sakari Ailus Subject: [PATCH v2 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls Date: Fri, 20 Mar 2015 14:30:47 +0100 Message-Id: <1426858247-25746-2-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426858247-25746-1-git-send-email-ricardo.ribalda@gmail.com> References: <1426858247-25746-1-git-send-email-ricardo.ribalda@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return changed == true in cluster_changed. This forces the value to be passed to the driver even if it has not changed. Signed-off-by: Ricardo Ribalda Delgado --- v2: By Sakari Ailus Fix CodeStyle (sorry :S) drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index bacaed6..04d7407 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1611,6 +1611,10 @@ static int cluster_changed(struct v4l2_ctrl *master) if (ctrl == NULL) continue; + + if (ctrl->flags & V4L2_CTRL_FLAG_EXECUTE_ON_WRITE) + changed = true; + /* * Set has_changed to false to avoid generating * the event V4L2_EVENT_CTRL_CH_VALUE