Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265225
| Path | csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] ALSA: ctxfi: constify amixer_rsc_ops structure |
| Date | Sun, 08 Nov 2015 23:30:03 +0100 |
| Message-ID | <qsGDh-69c-31@gated-at.bofh.it> (permalink) |
| X-Original-To | Jaroslav Kysela <perex@perex.cz> |
| X-Ironport-Av | E=Sophos;i="5.20,264,1444687200"; d="scan'208";a="186638331" |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | kernel-janitors@vger.kernel.org, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Sun, 8 Nov 2015 23:17:04 +0100 |
| X-Original-Message-ID | <1447021024-10392-1-git-send-email-Julia.Lawall@lip6.fr> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1265225 |
Show key headers only | View raw
The amixer_rsc_ops structure is never modified, so declare it as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
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 {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ALSA: ctxfi: constify amixer_rsc_ops structure Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-08 23:30 +0100
[PATCH v2] ALSA: ctxfi: constify rsc ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-09 00:00 +0100
Re: [PATCH v2] ALSA: ctxfi: constify rsc ops structures Takashi Iwai <tiwai@suse.de> - 2015-11-11 08:50 +0100
csiph-web