From patchwork Sun Nov 22 10:32:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7676021 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7262D9F2E2 for ; Sun, 22 Nov 2015 10:45:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C50D205E1 for ; Sun, 22 Nov 2015 10:45:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5481E205C7 for ; Sun, 22 Nov 2015 10:45:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 77A3A2619D8; Sun, 22 Nov 2015 11:44:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 494872606CD; Sun, 22 Nov 2015 11:44:51 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 83DE32606F3; Sun, 22 Nov 2015 11:44:50 +0100 (CET) Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by alsa0.perex.cz (Postfix) with ESMTP id 4EEBB260691 for ; Sun, 22 Nov 2015 11:44:43 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.20,331,1444687200"; d="scan'208";a="154697080" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 22 Nov 2015 11:44:42 +0100 From: Julia Lawall To: Hans de Goede Date: Sun, 22 Nov 2015 11:32:53 +0100 Message-Id: <1448188373-27089-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Takashi Iwai , Hans Verkuil , linux-media@vger.kernel.org Subject: [alsa-devel] [PATCH] media, sound: tea575x: constify snd_tea575x_ops structures X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The snd_tea575x_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Takashi Iwai --- drivers/media/pci/bt8xx/bttv-cards.c | 2 +- drivers/media/radio/radio-maxiradio.c | 2 +- drivers/media/radio/radio-sf16fmr2.c | 2 +- drivers/media/radio/radio-shark.c | 2 +- include/media/drv-intf/tea575x.h | 2 +- sound/pci/es1968.c | 2 +- sound/pci/fm801.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index cb38cd1..514f260 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -2605,7 +2605,7 @@ static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool outpu } } -static struct snd_tea575x_ops snd_es1968_tea_ops = { +static const struct snd_tea575x_ops snd_es1968_tea_ops = { .set_pins = snd_es1968_tea575x_set_pins, .get_pins = snd_es1968_tea575x_get_pins, .set_direction = snd_es1968_tea575x_set_direction, diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 5144a7f..759295a 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -815,7 +815,7 @@ static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output fm801_writew(chip, GPIO_CTRL, reg); } -static struct snd_tea575x_ops snd_fm801_tea_ops = { +static const struct snd_tea575x_ops snd_fm801_tea_ops = { .set_pins = snd_fm801_tea575x_set_pins, .get_pins = snd_fm801_tea575x_get_pins, .set_direction = snd_fm801_tea575x_set_direction, diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c index 7a08102..8a17cc0 100644 --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c @@ -3808,7 +3808,7 @@ static void bttv_tea575x_set_direction(struct snd_tea575x *tea, bool output) gpio_inout(mask, (1 << gpio.clk) | (1 << gpio.wren)); } -static struct snd_tea575x_ops bttv_tea_ops = { +static const struct snd_tea575x_ops bttv_tea_ops = { .set_pins = bttv_tea575x_set_pins, .get_pins = bttv_tea575x_get_pins, .set_direction = bttv_tea575x_set_direction, diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 8e4f1d1..dc81d42 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c @@ -82,7 +82,7 @@ static void fmr2_tea575x_set_direction(struct snd_tea575x *tea, bool output) { } -static struct snd_tea575x_ops fmr2_tea_ops = { +static const struct snd_tea575x_ops fmr2_tea_ops = { .set_pins = fmr2_tea575x_set_pins, .get_pins = fmr2_tea575x_get_pins, .set_direction = fmr2_tea575x_set_direction, diff --git a/include/media/drv-intf/tea575x.h b/include/media/drv-intf/tea575x.h index 5d09657..fb272d4 100644 --- a/include/media/drv-intf/tea575x.h +++ b/include/media/drv-intf/tea575x.h @@ -63,7 +63,7 @@ struct snd_tea575x { u32 band; /* 0: FM, 1: FM-Japan, 2: AM */ u32 freq; /* frequency */ struct mutex mutex; - struct snd_tea575x_ops *ops; + const struct snd_tea575x_ops *ops; void *private_data; u8 card[32]; u8 bus_info[32]; diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c index 409fac1..85667a9 100644 --- a/drivers/media/radio/radio-shark.c +++ b/drivers/media/radio/radio-shark.c @@ -150,7 +150,7 @@ static u32 shark_read_val(struct snd_tea575x *tea) return val; } -static struct snd_tea575x_ops shark_tea_ops = { +static const struct snd_tea575x_ops shark_tea_ops = { .write_val = shark_write_val, .read_val = shark_read_val, }; diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 41c1652..70fd8e8 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c @@ -108,7 +108,7 @@ static void maxiradio_tea575x_set_direction(struct snd_tea575x *tea, bool output { } -static struct snd_tea575x_ops maxiradio_tea_ops = { +static const struct snd_tea575x_ops maxiradio_tea_ops = { .set_pins = maxiradio_tea575x_set_pins, .get_pins = maxiradio_tea575x_get_pins, .set_direction = maxiradio_tea575x_set_direction,