From patchwork Thu Jun 12 16:09:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 4343231 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 452D6BEEAA for ; Thu, 12 Jun 2014 16:10:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87ACA201F7 for ; Thu, 12 Jun 2014 16:10:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B797C201C7 for ; Thu, 12 Jun 2014 16:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933684AbaFLQKZ (ORCPT ); Thu, 12 Jun 2014 12:10:25 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:53732 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933683AbaFLQKX (ORCPT ); Thu, 12 Jun 2014 12:10:23 -0400 Received: from valkosipuli.retiisi.org.uk (vihersipuli.retiisi.org.uk [IPv6:2001:1bc8:102:7fc9::84:2]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 6CD7260097 for ; Thu, 12 Jun 2014 19:10:21 +0300 (EEST) Received: by valkosipuli.retiisi.org.uk (Postfix, from userid 1005) id 1A7C22224C; Thu, 12 Jun 2014 19:09:50 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 5/5] smiapp: Set 64-bit integer control using v4l2_ctrl_s_ctrl_int64() Date: Thu, 12 Jun 2014 19:09:43 +0300 Message-Id: <1402589383-28165-6-git-send-email-sakari.ailus@iki.fi> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402589383-28165-1-git-send-email-sakari.ailus@iki.fi> References: <1402589383-28165-1-git-send-email-sakari.ailus@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Sakari Ailus Don't manipulate struct v4l2_ctrl directly. Instead, use v4l2_ctrl_s_ctrl_int64() to change the values. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index c669525..95d3d0e 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -297,8 +297,9 @@ static int smiapp_pll_update(struct smiapp_sensor *sensor) if (rval < 0) return rval; - sensor->pixel_rate_parray->cur.val64 = pll->vt_pix_clk_freq_hz; - sensor->pixel_rate_csi->cur.val64 = pll->pixel_rate_csi; + __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_parray, + pll->vt_pix_clk_freq_hz); + __v4l2_ctrl_s_ctrl_int64(sensor->pixel_rate_csi, pll->pixel_rate_csi); return 0; } @@ -471,6 +472,10 @@ static int smiapp_set_ctrl(struct v4l2_ctrl *ctrl) return smiapp_pll_update(sensor); + case V4L2_CID_PIXEL_RATE: + /* For v4l2_ctrl_s_ctrl_int64() used internally. */ + return 0; + default: return -EINVAL; }