Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1301738imd; Sat, 27 Oct 2018 06:25:07 -0700 (PDT) X-Google-Smtp-Source: AJdET5eAU+KhnCdBsg7JNKHnmc7f8myrSgmZEGFT+LeUcOyWYgHkBVFH+Aq/hmulUavyjhkC4dNq X-Received: by 2002:a63:5747:: with SMTP id h7-v6mr7174662pgm.423.1540646707216; Sat, 27 Oct 2018 06:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540646707; cv=none; d=google.com; s=arc-20160816; b=PDh7h5DKEzWEZcIB6wbIXO1zNWtZT4bmfWNJHFP+YqHv4x1Tg2nWZ34U+JULS3Bwlx Ie3Z529azxf39RNnmrX5ISTCD0vWc+dOADBIS1jz+lzT2p7/3I4E6WQoiaqbSfyJWF+v dIoeboaibKJ2Q21EuJ1Ah+4lKpdlBuhUZog+94RwSoJbovasmoFZWtvo6USnRQKNlU4G eFLe+iUTyJWtsnF3bNcJAOutlLXVnKcgz3YBVfUQfHLHZiL+o9BH5NNJohyh+oSbjb8F JdAuMwPGyiC8Ev2POmBfCFPjwHoppfVPztg1EnrwCLkPtl70BaKo9H3gMPz8gFpwu01D LmLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=HOTUCmC7/AwLWdZhg9E26K7obC38Iu7ObIaQv7dZKuY=; b=mYQN2ZniDYT6rnD23AeAOKPdEDkst3qhDMf/vzt0ZyLaGUuwR2oaa2LKY53tCqEDUm wzYhwAzp+ofc0WVdrmjnPEsl3QVlrYL/nLNgpF7qJxh/7Y1UI7rd3hpsNA4cye8blgLp u6y/jckXz4YminUI46+KLKVBmAqFvC/bZ6KH3VzXBdT64FQQ56a7AD9VwX7kOM21FPem 7P20gi5kYh6pVAjOPWMOMF0KJiuH/PVEYm+qgQwne0Fx1rl6w77V5LdSDanNSpiXuMNv 9O2zI1DBKI55edE/Xd8A/lsTe5co2uzzZN8TMBiG1EzVK+OJa6N1H1bFhGJoPryOwdbt DJXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b59-v6si14912313plb.206.2018.10.27.06.24.51; Sat, 27 Oct 2018 06:25:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728695AbeJ0WFX (ORCPT + 99 others); Sat, 27 Oct 2018 18:05:23 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:39531 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728674AbeJ0WFW (ORCPT ); Sat, 27 Oct 2018 18:05:22 -0400 X-IronPort-AV: E=Sophos;i="5.54,432,1534802400"; d="scan'208";a="353089207" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 27 Oct 2018 15:24:20 +0200 From: Julia Lawall To: Wenyou Yang Cc: kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] media: ov7740: constify structures stored in fields of v4l2_subdev_ops structure Date: Sat, 27 Oct 2018 14:49:04 +0200 Message-Id: <1540644545-26184-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1540644545-26184-1-git-send-email-Julia.Lawall@lip6.fr> References: <1540644545-26184-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fields of a v4l2_subdev_ops structure are all const, so the structures that are stored there and are not used elsewhere can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- drivers/media/i2c/ov7740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov7740.c b/drivers/media/i2c/ov7740.c index 6e9c233cfbe3..177688afd9a6 100644 --- a/drivers/media/i2c/ov7740.c +++ b/drivers/media/i2c/ov7740.c @@ -322,7 +322,7 @@ static int ov7740_set_power(struct ov7740 *ov7740, int on) return 0; } -static struct v4l2_subdev_core_ops ov7740_subdev_core_ops = { +static const struct v4l2_subdev_core_ops ov7740_subdev_core_ops = { .log_status = v4l2_ctrl_subdev_log_status, #ifdef CONFIG_VIDEO_ADV_DEBUG .g_register = ov7740_get_register, @@ -648,7 +648,7 @@ static int ov7740_s_frame_interval(struct v4l2_subdev *sd, return 0; } -static struct v4l2_subdev_video_ops ov7740_subdev_video_ops = { +static const struct v4l2_subdev_video_ops ov7740_subdev_video_ops = { .s_stream = ov7740_set_stream, .s_frame_interval = ov7740_s_frame_interval, .g_frame_interval = ov7740_g_frame_interval,