[alsa-devel] [PATCH 01/27] ALSA: seq: add const qualifier to table of functions for ioctl
Takashi Sakamoto
o-takashi at sakamocchi.jp
Mon Aug 8 16:54:27 CEST 2016
Each entry in this table is never changed in runtime. This commit moves it
from .data to .rodata section.
Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
sound/core/seq/seq_clientmgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index d6d9419..42be1e5 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2168,7 +2168,7 @@ static int snd_seq_ioctl_query_next_port(struct snd_seq_client *client,
/* -------------------------------------------------------- */
-static struct seq_ioctl_table {
+static const struct seq_ioctl_table {
unsigned int cmd;
int (*func)(struct snd_seq_client *client, void __user * arg);
} ioctl_tables[] = {
@@ -2207,7 +2207,7 @@ static struct seq_ioctl_table {
static int snd_seq_do_ioctl(struct snd_seq_client *client, unsigned int cmd,
void __user *arg)
{
- struct seq_ioctl_table *p;
+ const struct seq_ioctl_table *p;
switch (cmd) {
case SNDRV_SEQ_IOCTL_PVERSION:
--
2.7.4
More information about the Alsa-devel
mailing list