From 6e9ef32fab28835110b5981295e6895bcac3614b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 5 Jan 2020 15:47:32 +0100 Subject: ALSA: ppc: More constifications Apply const prefix to each possible place: the static tables for rate, volume, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-18-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/ppc/tumbler.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sound/ppc/tumbler.c') diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index a5843035d718..6e5bdaa262b0 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c @@ -106,7 +106,7 @@ struct pmac_tumbler { /* */ -static int send_init_client(struct pmac_keywest *i2c, unsigned int *regs) +static int send_init_client(struct pmac_keywest *i2c, const unsigned int *regs) { while (*regs > 0) { int err, count = 10; @@ -128,7 +128,7 @@ static int send_init_client(struct pmac_keywest *i2c, unsigned int *regs) static int tumbler_init_client(struct pmac_keywest *i2c) { - static unsigned int regs[] = { + static const unsigned int regs[] = { /* normal operation, SCLK=64fps, i2s output, i2s input, 16bit width */ TAS_REG_MCS, (1<<6)|(2<<4)|(2<<2)|0, 0, /* terminator */ @@ -139,7 +139,7 @@ static int tumbler_init_client(struct pmac_keywest *i2c) static int snapper_init_client(struct pmac_keywest *i2c) { - static unsigned int regs[] = { + static const unsigned int regs[] = { /* normal operation, SCLK=64fps, i2s output, 16bit width */ TAS_REG_MCS, (1<<6)|(2<<4)|0, /* normal operation, all-pass mode */ @@ -478,11 +478,11 @@ struct tumbler_mono_vol { int reg; int bytes; unsigned int max; - unsigned int *table; + const unsigned int *table; }; static int tumbler_set_mono_volume(struct pmac_tumbler *mix, - struct tumbler_mono_vol *info) + const struct tumbler_mono_vol *info) { unsigned char block[4]; unsigned int vol; @@ -553,7 +553,7 @@ static int tumbler_put_mono(struct snd_kcontrol *kcontrol, } /* TAS3001c mono volumes */ -static struct tumbler_mono_vol tumbler_pcm_vol_info = { +static const struct tumbler_mono_vol tumbler_pcm_vol_info = { .index = VOL_IDX_PCM_MONO, .reg = TAS_REG_PCM, .bytes = 3, @@ -561,7 +561,7 @@ static struct tumbler_mono_vol tumbler_pcm_vol_info = { .table = mixer_volume_table, }; -static struct tumbler_mono_vol tumbler_bass_vol_info = { +static const struct tumbler_mono_vol tumbler_bass_vol_info = { .index = VOL_IDX_BASS, .reg = TAS_REG_BASS, .bytes = 1, @@ -569,7 +569,7 @@ static struct tumbler_mono_vol tumbler_bass_vol_info = { .table = bass_volume_table, }; -static struct tumbler_mono_vol tumbler_treble_vol_info = { +static const struct tumbler_mono_vol tumbler_treble_vol_info = { .index = VOL_IDX_TREBLE, .reg = TAS_REG_TREBLE, .bytes = 1, @@ -578,7 +578,7 @@ static struct tumbler_mono_vol tumbler_treble_vol_info = { }; /* TAS3004 mono volumes */ -static struct tumbler_mono_vol snapper_bass_vol_info = { +static const struct tumbler_mono_vol snapper_bass_vol_info = { .index = VOL_IDX_BASS, .reg = TAS_REG_BASS, .bytes = 1, @@ -586,7 +586,7 @@ static struct tumbler_mono_vol snapper_bass_vol_info = { .table = snapper_bass_volume_table, }; -static struct tumbler_mono_vol snapper_treble_vol_info = { +static const struct tumbler_mono_vol snapper_treble_vol_info = { .index = VOL_IDX_TREBLE, .reg = TAS_REG_TREBLE, .bytes = 1, -- cgit v1.2.3