From patchwork Sun Nov 8 22:17:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7579621 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 926399F392 for ; Sun, 8 Nov 2015 22:28:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD5D92060D for ; Sun, 8 Nov 2015 22:28:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CB0872060C for ; Sun, 8 Nov 2015 22:28:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4FF4F2610A6; Sun, 8 Nov 2015 23:28:52 +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 EE2AB2606CA; Sun, 8 Nov 2015 23:28:44 +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 3A6292606D2; Sun, 8 Nov 2015 23:28:43 +0100 (CET) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by alsa0.perex.cz (Postfix) with ESMTP id 2E3262606BA for ; Sun, 8 Nov 2015 23:28:36 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.20,264,1444687200"; d="scan'208";a="186638331" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 08 Nov 2015 23:28:35 +0100 From: Julia Lawall To: Jaroslav Kysela Date: Sun, 8 Nov 2015 23:17:04 +0100 Message-Id: <1447021024-10392-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ALSA: ctxfi: constify amixer_rsc_ops structure 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 amixer_rsc_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- sound/pci/ctxfi/ctamixer.c | 2 +- sound/pci/ctxfi/ctamixer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c index c7dc38d..465b5c5 100644 --- a/sound/pci/ctxfi/ctamixer.c +++ b/sound/pci/ctxfi/ctamixer.c @@ -186,7 +186,7 @@ static int amixer_setup(struct amixer *amixer, struct rsc *input, return 0; } -static struct amixer_rsc_ops amixer_ops = { +static const struct amixer_rsc_ops amixer_ops = { .set_input = amixer_set_input, .set_invalid_squash = amixer_set_invalid_squash, .set_scale = amixer_set_y, diff --git a/sound/pci/ctxfi/ctamixer.h b/sound/pci/ctxfi/ctamixer.h index 72f42f2..2de18aa 100644 --- a/sound/pci/ctxfi/ctamixer.h +++ b/sound/pci/ctxfi/ctamixer.h @@ -58,7 +58,7 @@ struct amixer { unsigned char idx[8]; struct rsc *input; /* pointer to a resource acting as source */ struct sum *sum; /* Put amixer output to this summation node */ - struct amixer_rsc_ops *ops; /* AMixer specific operations */ + const struct amixer_rsc_ops *ops; /* AMixer specific operations */ }; struct amixer_rsc_ops {