From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbdI0Iim (ORCPT ); Wed, 27 Sep 2017 04:38:42 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36787 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750703AbdI0Iij (ORCPT ); Wed, 27 Sep 2017 04:38:39 -0400 X-Google-Smtp-Source: AOwi7QCt92HMSlndKRxpyi6HTDuyo52YxXKBaeI9TJeOU5gnEQqx0BOuWUPlwnmUxbgsxelHuBNrrQ== From: Bhumika Goyal To: julia.lawall@lip6.fr, hverkuil@xs4all.nl, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] [media] radio-si470x: make si470x_viddev_template const Date: Wed, 27 Sep 2017 14:08:29 +0530 Message-Id: <1506501509-12369-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 Make this const as it is only used in a copy operation in the files referencing it. Add const to declaration in the header too. Structure found using Coccienlle and changes done by hand. Signed-off-by: Bhumika Goyal --- drivers/media/radio/si470x/radio-si470x-common.c | 2 +- drivers/media/radio/si470x/radio-si470x.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c index cd76fac..c89a7d5 100644 --- a/drivers/media/radio/si470x/radio-si470x-common.c +++ b/drivers/media/radio/si470x/radio-si470x-common.c @@ -749,7 +749,7 @@ static int si470x_vidioc_enum_freq_bands(struct file *file, void *priv, /* * si470x_viddev_template - video device interface */ -struct video_device si470x_viddev_template = { +const struct video_device si470x_viddev_template = { .fops = &si470x_fops, .name = DRIVER_NAME, .release = video_device_release_empty, diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h index 7d2defd..eb7b834 100644 --- a/drivers/media/radio/si470x/radio-si470x.h +++ b/drivers/media/radio/si470x/radio-si470x.h @@ -209,7 +209,7 @@ struct si470x_device { /************************************************************************** * Common Functions **************************************************************************/ -extern struct video_device si470x_viddev_template; +extern const struct video_device si470x_viddev_template; extern const struct v4l2_ctrl_ops si470x_ctrl_ops; int si470x_get_register(struct si470x_device *radio, int regnr); int si470x_set_register(struct si470x_device *radio, int regnr); -- 1.9.1