Skip to content

Commit

Permalink
ALSA: aoa: make snd_kcontrol_new const
Browse files Browse the repository at this point in the history
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
goyalbhumika authored and tiwai committed Aug 16, 2017
1 parent eb2c183 commit bb1c928
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sound/aoa/codecs/onyx.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int onyx_snd_vol_put(struct snd_kcontrol *kcontrol,
return 1;
}

static struct snd_kcontrol_new volume_control = {
static const struct snd_kcontrol_new volume_control = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Master Playback Volume",
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
Expand Down Expand Up @@ -229,7 +229,7 @@ static int onyx_snd_inputgain_put(struct snd_kcontrol *kcontrol,
return n != v;
}

static struct snd_kcontrol_new inputgain_control = {
static const struct snd_kcontrol_new inputgain_control = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Master Capture Volume",
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
Expand Down Expand Up @@ -284,7 +284,7 @@ static int onyx_snd_capture_source_put(struct snd_kcontrol *kcontrol,
return 1;
}

static struct snd_kcontrol_new capture_source_control = {
static const struct snd_kcontrol_new capture_source_control = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
/* If we name this 'Input Source', it properly shows up in
* alsamixer as a selection, * but it's shown under the
Expand Down Expand Up @@ -348,7 +348,7 @@ static int onyx_snd_mute_put(struct snd_kcontrol *kcontrol,
return !err ? (v != c) : err;
}

static struct snd_kcontrol_new mute_control = {
static const struct snd_kcontrol_new mute_control = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Master Playback Switch",
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
Expand Down Expand Up @@ -476,7 +476,7 @@ static int onyx_spdif_mask_get(struct snd_kcontrol *kcontrol,
return 0;
}

static struct snd_kcontrol_new onyx_spdif_mask = {
static const struct snd_kcontrol_new onyx_spdif_mask = {
.access = SNDRV_CTL_ELEM_ACCESS_READ,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,CON_MASK),
Expand Down Expand Up @@ -533,7 +533,7 @@ static int onyx_spdif_put(struct snd_kcontrol *kcontrol,
return 1;
}

static struct snd_kcontrol_new onyx_spdif_ctrl = {
static const struct snd_kcontrol_new onyx_spdif_ctrl = {
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
.iface = SNDRV_CTL_ELEM_IFACE_PCM,
.name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
Expand Down

0 comments on commit bb1c928

Please sign in to comment.