Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbdI0ORD (ORCPT ); Wed, 27 Sep 2017 10:17:03 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:32921 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732AbdI0ORB (ORCPT ); Wed, 27 Sep 2017 10:17:01 -0400 X-Google-Smtp-Source: AOwi7QDa85rWWMfgmLaLexQ0AWoEDgNBlXJX3T7Dh+XZHAoZl0ThnitVsFc4IZSyQVKqR/vFFYYebA== From: Bhumika Goyal To: julia.lawall@lip6.fr, mchehab@kernel.org, mjpeg-users@lists.sourceforge.net, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH v2] [media] zoran: make zoran_template const Date: Wed, 27 Sep 2017 19:46:47 +0530 Message-Id: <1506521807-18333-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1379 Lines: 42 Make this const as it is only used in a copy operation in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- Changes in v2: * Fix spelling mistake in the commit message. drivers/media/pci/zoran/zoran_card.h | 2 +- drivers/media/pci/zoran/zoran_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/zoran/zoran_card.h b/drivers/media/pci/zoran/zoran_card.h index 81cba17..0cdb7d3 100644 --- a/drivers/media/pci/zoran/zoran_card.h +++ b/drivers/media/pci/zoran/zoran_card.h @@ -37,7 +37,7 @@ /* Anybody who uses more than four? */ #define BUZ_MAX 4 -extern struct video_device zoran_template; +extern const struct video_device zoran_template; extern int zoran_check_jpg_settings(struct zoran *zr, struct zoran_jpg_settings *settings, diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index a11cb50..d078400 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c @@ -2839,7 +2839,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh, .poll = zoran_poll, }; -struct video_device zoran_template = { +const struct video_device zoran_template = { .name = ZORAN_NAME, .fops = &zoran_fops, .ioctl_ops = &zoran_ioctl_ops, -- 1.9.1