From: Takashi Iwai Date: Sun, 5 Jan 2020 14:47:57 +0000 (+0100) Subject: ALSA: opl3: More constifications X-Git-Tag: v5.6-rc1~150^2~55 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e3de2a406ef525302e8a0805a753af13db26c844;p=linux.git ALSA: opl3: More constifications Apply const prefix to the static tables for drum, volume and notes. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-43-tiwai@suse.de Signed-off-by: Takashi Iwai --- diff --git a/sound/drivers/opl3/opl3_drums.c b/sound/drivers/opl3/opl3_drums.c index 318cd8a2ee3a..ccc49f39404d 100644 --- a/sound/drivers/opl3/opl3_drums.c +++ b/sound/drivers/opl3/opl3_drums.c @@ -7,7 +7,7 @@ #include "opl3_voice.h" -static char snd_opl3_drum_table[47] = +static const char snd_opl3_drum_table[47] = { OPL3_BASSDRUM_ON, OPL3_BASSDRUM_ON, OPL3_HIHAT_ON, /* 35 - 37 */ OPL3_SNAREDRUM_ON, OPL3_HIHAT_ON, OPL3_SNAREDRUM_ON, /* 38 - 40 */ diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index 280cc79870cf..2f6e8023e05c 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c @@ -23,7 +23,7 @@ static void snd_opl3_note_off_unsafe(void *p, int note, int vel, * it saves a lot of log() calculations. (Rob Hooft ) */ -static char opl3_volume_table[128] = +static const char opl3_volume_table[128] = { -63, -48, -40, -35, -32, -29, -27, -26, -24, -23, -21, -20, -19, -18, -18, -17, @@ -69,7 +69,7 @@ void snd_opl3_calc_volume(unsigned char *volbyte, int vel, /* * Converts the note frequency to block and fnum values for the FM chip */ -static short opl3_note_table[16] = +static const short opl3_note_table[16] = { 305, 323, /* for pitch bending, -2 semitones */ 343, 363, 385, 408, 432, 458, 485, 514, 544, 577, 611, 647, @@ -266,7 +266,7 @@ static void snd_opl3_start_timer(struct snd_opl3 *opl3) /* ------------------------------ */ -static int snd_opl3_oss_map[MAX_OPL3_VOICES] = { +static const int snd_opl3_oss_map[MAX_OPL3_VOICES] = { 0, 1, 2, 9, 10, 11, 6, 7, 8, 15, 16, 17, 3, 4 ,5, 12, 13, 14 };