Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: aoa: More constifications

Apply const prefix at every place where appropriate: the static
register tables, the volume tables and the callback tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+6 -6
+2 -2
sound/aoa/codecs/onyx.c
··· 543 543 544 544 /* our registers */ 545 545 546 - static u8 register_map[] = { 546 + static const u8 register_map[] = { 547 547 ONYX_REG_DAC_ATTEN_LEFT, 548 548 ONYX_REG_DAC_ATTEN_RIGHT, 549 549 ONYX_REG_CONTROL, ··· 559 559 ONYX_REG_DIG_INFO4 560 560 }; 561 561 562 - static u8 initial_values[ARRAY_SIZE(register_map)] = { 562 + static const u8 initial_values[ARRAY_SIZE(register_map)] = { 563 563 0x80, 0x80, /* muted */ 564 564 ONYX_MRST | ONYX_SRST, /* but handled specially! */ 565 565 ONYX_MUTE_LEFT | ONYX_MUTE_RIGHT,
+2 -2
sound/aoa/codecs/tas-basstreble.h
··· 13 13 #define TAS3004_TREBLE_ZERO 36 14 14 #define TAS3004_BASS_ZERO 36 15 15 16 - static u8 tas3004_treble_table[] = { 16 + static const u8 tas3004_treble_table[] = { 17 17 150, /* -18 dB */ 18 18 149, 19 19 148, ··· 99 99 * I have also ignored completely differences of 100 100 * +/- 1 101 101 */ 102 - static s8 tas3004_bass_diff_to_treble[] = { 102 + static const s8 tas3004_bass_diff_to_treble[] = { 103 103 2, /* 7 dB, offset 50 */ 104 104 2, 105 105 2,
+1 -1
sound/aoa/codecs/tas-gain-table.h
··· 27 27 * as easy as calculating 28 28 * hwvalue = 1048576.0*exp(0.057564628*dB*2) 29 29 * :) */ 30 - static int tas_gaintable[] = { 30 + static const int tas_gaintable[] = { 31 31 0x000000, /* -infinity dB */ 32 32 0x00014b, /* -70.0 dB */ 33 33 0x00015f, /* -69.5 dB */
+1 -1
sound/aoa/soundbus/i2sbus/core.c
··· 160 160 static const char *rnames[] = { "i2sbus: %pOFn (control)", 161 161 "i2sbus: %pOFn (tx)", 162 162 "i2sbus: %pOFn (rx)" }; 163 - static irq_handler_t ints[] = { 163 + static const irq_handler_t ints[] = { 164 164 i2sbus_bus_intr, 165 165 i2sbus_tx_intr, 166 166 i2sbus_rx_intr