summaryrefslogtreecommitdiff
path: root/sound/pci/ice1712/maya44.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-01-05 15:47:31 +0100
committerTakashi Iwai <tiwai@suse.de>2020-01-05 16:14:41 +0100
commitf16a4e960ab3475d71df6f0d968c5393f3eca2aa (patch)
treeaaf79e338533a194579346a2da22a431a5ca97ab /sound/pci/ice1712/maya44.c
parentbf6f3d74c9594c3a684620d3d7418a73ee659288 (diff)
ALSA: ice1712: More constifications
Apply const prefix to each possible place: the EEPROM tables, the static string arrays, the init verb tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-17-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/maya44.c')
-rw-r--r--sound/pci/ice1712/maya44.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/ice1712/maya44.c b/sound/pci/ice1712/maya44.c
index c2761e009c67..b46df1821251 100644
--- a/sound/pci/ice1712/maya44.c
+++ b/sound/pci/ice1712/maya44.c
@@ -116,7 +116,7 @@ struct maya_vol_info {
unsigned char mux_bits[2]; /* extra bits for ADC mute */
};
-static struct maya_vol_info vol_info[WM_NUM_VOLS] = {
+static const struct maya_vol_info vol_info[WM_NUM_VOLS] = {
[WM_VOL_HP] = {
.maxval = 80,
.regs = { WM8776_REG_HEADPHONE_L, WM8776_REG_HEADPHONE_R },
@@ -158,7 +158,7 @@ static int maya_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
unsigned int idx = kcontrol->private_value;
- struct maya_vol_info *vol = &vol_info[idx];
+ const struct maya_vol_info *vol = &vol_info[idx];
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
@@ -189,7 +189,7 @@ static int maya_vol_put(struct snd_kcontrol *kcontrol,
struct snd_wm8776 *wm =
&chip->wm[snd_ctl_get_ioff(kcontrol, &ucontrol->id)];
unsigned int idx = kcontrol->private_value;
- struct maya_vol_info *vol = &vol_info[idx];
+ const struct maya_vol_info *vol = &vol_info[idx];
unsigned int val, data;
int ch, changed = 0;
@@ -662,7 +662,7 @@ static const struct snd_pcm_hw_constraint_list dac_rates = {
/*
* chip addresses on I2C bus
*/
-static unsigned char wm8776_addr[2] = {
+static const unsigned char wm8776_addr[2] = {
0x34, 0x36, /* codec 0 & 1 */
};
@@ -712,7 +712,7 @@ static int maya44_init(struct snd_ice1712 *ice)
* hence the driver needs to sets up it properly.
*/
-static unsigned char maya44_eeprom[] = {
+static const unsigned char maya44_eeprom[] = {
[ICE_EEP2_SYSCONF] = 0x45,
/* clock xin1=49.152MHz, mpu401, 2 stereo ADCs+DACs */
[ICE_EEP2_ACLINK] = 0x80,