]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: declare snd_kcontrol_new structures as const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 27 May 2017 14:46:15 +0000 (20:16 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 May 2017 08:29:25 +0000 (10:29 +0200)
Declare snd_kcontrol_new structures as const as they are only passed an
argument to the function snd_ctl_new1. This argument is of type const,
so snd_kcontrol_new structures having this property can be made const.
Done using Coccinelle:

@r disable optional_qualifier@
identifier x;
position p;
@@
static struct snd_kcontrol_new x@p={...};

@ok@
identifier r.x;
position p;
@@
snd_ctl_new1(&x@p,...)

@bad@
position p != {r.p,ok.p};
identifier r.x;
@@
x@p

@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct snd_kcontrol_new x;

Cross compiled these files:
sound/aoa/codecs/tas.c - powerpc
sound/mips/{hal2.c/sgio2audio.c} - mips
sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc
sound/soc/sh/siu_dai.c - sh
Could not find an architecture to compile sound/sh/aica.c.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 files changed:
sound/aoa/codecs/tas.c
sound/aoa/fabrics/layout.c
sound/core/ctljack.c
sound/drivers/vx/vx_mixer.c
sound/firewire/bebob/bebob_maudio.c
sound/mips/hal2.c
sound/mips/sgio2audio.c
sound/pcmcia/vx/vxp_mixer.c
sound/ppc/awacs.c
sound/ppc/beep.c
sound/ppc/tumbler.c
sound/sh/aica.c
sound/soc/sh/siu_dai.c
sound/usb/mixer_quirks.c

index 78ed1ffbf786e408dd3a6de02fdf5ff065367417..733b6365dad63af5cd8bf6edc43c44d850083289 100644 (file)
@@ -271,7 +271,7 @@ static int tas_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,
@@ -314,7 +314,7 @@ static int tas_snd_mute_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-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,
@@ -426,7 +426,7 @@ static int tas_snd_drc_range_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new drc_range_control = {
+static const struct snd_kcontrol_new drc_range_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "DRC Range",
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -466,7 +466,7 @@ static int tas_snd_drc_switch_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new drc_switch_control = {
+static const struct snd_kcontrol_new drc_switch_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "DRC Range Switch",
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -524,7 +524,7 @@ static int tas_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
@@ -586,7 +586,7 @@ static int tas_snd_treble_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new treble_control = {
+static const struct snd_kcontrol_new treble_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Treble",
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -637,7 +637,7 @@ static int tas_snd_bass_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new bass_control = {
+static const struct snd_kcontrol_new bass_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Bass",
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
index a0c4a5de809c0e43f8a213d401ab7679869502b8..1eddf8fa188f1c619fbeaf271f100240ac687a76 100644 (file)
@@ -707,7 +707,7 @@ static int detect_choice_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new headphone_detect_choice = {
+static const struct snd_kcontrol_new headphone_detect_choice = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Headphone Detect Autoswitch",
        .info = control_info,
@@ -717,7 +717,7 @@ static struct snd_kcontrol_new headphone_detect_choice = {
        .private_value = 0,
 };
 
-static struct snd_kcontrol_new lineout_detect_choice = {
+static const struct snd_kcontrol_new lineout_detect_choice = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Line-Out Detect Autoswitch",
        .info = control_info,
@@ -749,7 +749,7 @@ static int detected_get(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-static struct snd_kcontrol_new headphone_detected = {
+static const struct snd_kcontrol_new headphone_detected = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Headphone Detected",
        .info = control_info,
@@ -758,7 +758,7 @@ static struct snd_kcontrol_new headphone_detected = {
        .private_value = 0,
 };
 
-static struct snd_kcontrol_new lineout_detected = {
+static const struct snd_kcontrol_new lineout_detected = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Line-Out Detected",
        .info = control_info,
index 84a3cd683068a3bbf4a752e05c399600ce83572b..0249d5e6ac23f5b4c48e472d732212672069e292 100644 (file)
@@ -23,7 +23,7 @@ static int jack_detect_kctl_get(struct snd_kcontrol *kcontrol,
        return 0;
 }
 
-static struct snd_kcontrol_new jack_detect_kctl = {
+static const struct snd_kcontrol_new jack_detect_kctl = {
        /* name is filled later */
        .iface = SNDRV_CTL_ELEM_IFACE_CARD,
        .access = SNDRV_CTL_ELEM_ACCESS_READ,
index be9477e3073913b777839a053f8bf97343c95fa3..98a41ac40b608b13ad14aa85154a8fceae6e3db3 100644 (file)
@@ -455,7 +455,7 @@ static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ele
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_output_level = {
+static const struct snd_kcontrol_new vx_control_output_level = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .access =       (SNDRV_CTL_ELEM_ACCESS_READWRITE |
                         SNDRV_CTL_ELEM_ACCESS_TLV_READ),
@@ -514,7 +514,7 @@ static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_audio_src = {
+static const struct snd_kcontrol_new vx_control_audio_src = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Capture Source",
        .info =         vx_audio_src_info,
@@ -558,7 +558,7 @@ static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_clock_mode = {
+static const struct snd_kcontrol_new vx_control_clock_mode = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Clock Mode",
        .info =         vx_clock_mode_info,
@@ -717,7 +717,7 @@ static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
 
 static const DECLARE_TLV_DB_SCALE(db_scale_audio_gain, -10975, 25, 0);
 
-static struct snd_kcontrol_new vx_control_audio_gain = {
+static const struct snd_kcontrol_new vx_control_audio_gain = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .access =       (SNDRV_CTL_ELEM_ACCESS_READWRITE |
                         SNDRV_CTL_ELEM_ACCESS_TLV_READ),
@@ -727,14 +727,14 @@ static struct snd_kcontrol_new vx_control_audio_gain = {
        .put =          vx_audio_gain_put,
        .tlv = { .p = db_scale_audio_gain },
 };
-static struct snd_kcontrol_new vx_control_output_switch = {
+static const struct snd_kcontrol_new vx_control_output_switch = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "PCM Playback Switch",
        .info =         vx_audio_sw_info,
        .get =          vx_audio_sw_get,
        .put =          vx_audio_sw_put
 };
-static struct snd_kcontrol_new vx_control_monitor_gain = {
+static const struct snd_kcontrol_new vx_control_monitor_gain = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Monitoring Volume",
        .access =       (SNDRV_CTL_ELEM_ACCESS_READWRITE |
@@ -744,7 +744,7 @@ static struct snd_kcontrol_new vx_control_monitor_gain = {
        .put =          vx_audio_monitor_put,
        .tlv = { .p = db_scale_audio_gain },
 };
-static struct snd_kcontrol_new vx_control_monitor_switch = {
+static const struct snd_kcontrol_new vx_control_monitor_switch = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Monitoring Switch",
        .info =         vx_audio_sw_info,       /* shared */
@@ -805,7 +805,7 @@ static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_valu
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_iec958_mask = {
+static const struct snd_kcontrol_new vx_control_iec958_mask = {
        .access =       SNDRV_CTL_ELEM_ACCESS_READ,
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK),
@@ -813,7 +813,7 @@ static struct snd_kcontrol_new vx_control_iec958_mask = {
        .get =          vx_iec958_mask_get,
 };
 
-static struct snd_kcontrol_new vx_control_iec958 = {
+static const struct snd_kcontrol_new vx_control_iec958 = {
        .iface =        SNDRV_CTL_ELEM_IFACE_PCM,
        .name =         SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
        .info =         vx_iec958_info,
@@ -878,7 +878,7 @@ static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_vu_meter = {
+static const struct snd_kcontrol_new vx_control_vu_meter = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
        /* name will be filled later */
@@ -886,7 +886,7 @@ static struct snd_kcontrol_new vx_control_vu_meter = {
        .get =          vx_vu_meter_get,
 };
 
-static struct snd_kcontrol_new vx_control_peak_meter = {
+static const struct snd_kcontrol_new vx_control_peak_meter = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
        /* name will be filled later */
@@ -894,7 +894,7 @@ static struct snd_kcontrol_new vx_control_peak_meter = {
        .get =          vx_peak_meter_get,
 };
 
-static struct snd_kcontrol_new vx_control_saturation = {
+static const struct snd_kcontrol_new vx_control_saturation = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Input Saturation",
        .access =       SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
index 07e5abdbceb59cec189726d79ee5d200d452e53b..d10208f92edfa520ef68579f6961f5e36791bf5a 100644 (file)
@@ -396,7 +396,7 @@ static int special_clk_ctl_put(struct snd_kcontrol *kctl,
 
        return err;
 }
-static struct snd_kcontrol_new special_clk_ctl = {
+static const struct snd_kcontrol_new special_clk_ctl = {
        .name   = "Clock Source",
        .iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -429,7 +429,7 @@ static int special_sync_ctl_get(struct snd_kcontrol *kctl,
 
        return 0;
 }
-static struct snd_kcontrol_new special_sync_ctl = {
+static const struct snd_kcontrol_new special_sync_ctl = {
        .name   = "Sync Status",
        .iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
        .access = SNDRV_CTL_ELEM_ACCESS_READ,
@@ -521,7 +521,7 @@ end:
        mutex_unlock(&bebob->mutex);
        return err;
 }
-static struct snd_kcontrol_new special_dig_in_iface_ctl = {
+static const struct snd_kcontrol_new special_dig_in_iface_ctl = {
        .name   = "Digital Input Interface",
        .iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -577,7 +577,7 @@ static int special_dig_out_iface_ctl_set(struct snd_kcontrol *kctl,
        mutex_unlock(&bebob->mutex);
        return err;
 }
-static struct snd_kcontrol_new special_dig_out_iface_ctl = {
+static const struct snd_kcontrol_new special_dig_out_iface_ctl = {
        .name   = "Digital Output Interface",
        .iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
        .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
index 684dc4ddef4131389352e5c1bd3aa8b0ead1644b..6505deb8c06befe2da1c4ee2a34c371b6e9e1e01 100644 (file)
@@ -264,7 +264,7 @@ static int hal2_gain_put(struct snd_kcontrol *kcontrol,
        return old != new;
 }
 
-static struct snd_kcontrol_new hal2_ctrl_headphone = {
+static const struct snd_kcontrol_new hal2_ctrl_headphone = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Headphone Playback Volume",
        .access         = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -274,7 +274,7 @@ static struct snd_kcontrol_new hal2_ctrl_headphone = {
        .put            = hal2_gain_put,
 };
 
-static struct snd_kcontrol_new hal2_ctrl_mic = {
+static const struct snd_kcontrol_new hal2_ctrl_mic = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Mic Capture Volume",
        .access         = SNDRV_CTL_ELEM_ACCESS_READWRITE,
index f07aa3993f837d1dd18c5a557fe38faaf93c3992..0ebc1c3727df86bd2da8f6f51742a801b64bac73 100644 (file)
@@ -230,7 +230,7 @@ static int sgio2audio_source_put(struct snd_kcontrol *kcontrol,
 }
 
 /* dac1/pcm0 mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_pcm0 = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_pcm0 = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "PCM Playback Volume",
        .index          = 0,
@@ -242,7 +242,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_pcm0 = {
 };
 
 /* dac2/pcm1 mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_pcm1 = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_pcm1 = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "PCM Playback Volume",
        .index          = 1,
@@ -254,7 +254,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_pcm1 = {
 };
 
 /* record level mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_reclevel = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_reclevel = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Capture Volume",
        .access         = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -265,7 +265,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_reclevel = {
 };
 
 /* record level source control */
-static struct snd_kcontrol_new sgio2audio_ctrl_recsource = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_recsource = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Capture Source",
        .access         = SNDRV_CTL_ELEM_ACCESS_READWRITE,
@@ -275,7 +275,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_recsource = {
 };
 
 /* line mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_line = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_line = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Line Playback Volume",
        .index          = 0,
@@ -287,7 +287,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_line = {
 };
 
 /* cd mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_cd = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_cd = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Line Playback Volume",
        .index          = 1,
@@ -299,7 +299,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_cd = {
 };
 
 /* mic mixer control */
-static struct snd_kcontrol_new sgio2audio_ctrl_mic = {
+static const struct snd_kcontrol_new sgio2audio_ctrl_mic = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "Mic Playback Volume",
        .access         = SNDRV_CTL_ELEM_ACCESS_READWRITE,
index 1ca3eef9e3051593ca737d70e8bd15b39ee4f099..304b153005a5031f839ac9b14232211c9075cfbc 100644 (file)
@@ -69,7 +69,7 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
 
 static const DECLARE_TLV_DB_SCALE(db_scale_mic, -21, 3, 0);
 
-static struct snd_kcontrol_new vx_control_mic_level = {
+static const struct snd_kcontrol_new vx_control_mic_level = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .access =       (SNDRV_CTL_ELEM_ACCESS_READWRITE |
                         SNDRV_CTL_ELEM_ACCESS_TLV_READ),
@@ -109,7 +109,7 @@ static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
        return 0;
 }
 
-static struct snd_kcontrol_new vx_control_mic_boost = {
+static const struct snd_kcontrol_new vx_control_mic_boost = {
        .iface =        SNDRV_CTL_ELEM_IFACE_MIXER,
        .name =         "Mic Boost",
        .info =         vx_mic_boost_info,
index 1468e4b7bf934fac19e04bd6b0aef6b5536e0589..d1e4ef1c5c30b956a9c36bbc7a35ff9863b25dd9 100644 (file)
@@ -514,7 +514,7 @@ static struct snd_kcontrol_new snd_pmac_awacs_amp_vol[] = {
        },
 };
 
-static struct snd_kcontrol_new snd_pmac_awacs_amp_hp_sw = {
+static const struct snd_kcontrol_new snd_pmac_awacs_amp_hp_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Headphone Playback Switch",
        .info = snd_pmac_boolean_stereo_info,
@@ -523,7 +523,7 @@ static struct snd_kcontrol_new snd_pmac_awacs_amp_hp_sw = {
        .private_value = AMP_CH_HD,
 };
 
-static struct snd_kcontrol_new snd_pmac_awacs_amp_spk_sw = {
+static const struct snd_kcontrol_new snd_pmac_awacs_amp_spk_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Speaker Playback Switch",
        .info = snd_pmac_boolean_stereo_info,
index d3524f9fa05de1a5f7fc7dc870c5374d2588b8a2..f19eb3e399375b86a4e61eb4bc544d47c4b9f019 100644 (file)
@@ -206,7 +206,7 @@ static int snd_pmac_put_beep(struct snd_kcontrol *kcontrol,
        return oval != chip->beep->volume;
 }
 
-static struct snd_kcontrol_new snd_pmac_beep_mixer = {
+static const struct snd_kcontrol_new snd_pmac_beep_mixer = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Beep Playback Volume",
        .info = snd_pmac_info_beep,
index 58ee8089bbf98714fb47bcc9b5c757ee1a7e088f..0779a29122379b6368a8e62a7602b857fb32f8ff 100644 (file)
@@ -897,7 +897,7 @@ static struct snd_kcontrol_new snapper_mixers[] = {
        },
 };
 
-static struct snd_kcontrol_new tumbler_hp_sw = {
+static const struct snd_kcontrol_new tumbler_hp_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Headphone Playback Switch",
        .info = snd_pmac_boolean_mono_info,
@@ -905,7 +905,7 @@ static struct snd_kcontrol_new tumbler_hp_sw = {
        .put = tumbler_put_mute_switch,
        .private_value = TUMBLER_MUTE_HP,
 };
-static struct snd_kcontrol_new tumbler_speaker_sw = {
+static const struct snd_kcontrol_new tumbler_speaker_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Speaker Playback Switch",
        .info = snd_pmac_boolean_mono_info,
@@ -913,7 +913,7 @@ static struct snd_kcontrol_new tumbler_speaker_sw = {
        .put = tumbler_put_mute_switch,
        .private_value = TUMBLER_MUTE_AMP,
 };
-static struct snd_kcontrol_new tumbler_lineout_sw = {
+static const struct snd_kcontrol_new tumbler_lineout_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "Line Out Playback Switch",
        .info = snd_pmac_boolean_mono_info,
@@ -921,7 +921,7 @@ static struct snd_kcontrol_new tumbler_lineout_sw = {
        .put = tumbler_put_mute_switch,
        .private_value = TUMBLER_MUTE_LINE,
 };
-static struct snd_kcontrol_new tumbler_drc_sw = {
+static const struct snd_kcontrol_new tumbler_drc_sw = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "DRC Switch",
        .info = snd_pmac_boolean_mono_info,
index fbbc252795599655bac0f795fbe47b607f18f8d8..ab4802df62e15013d72324c2731fb5b4acc08ae1 100644 (file)
@@ -535,7 +535,7 @@ static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol,
        return 1;
 }
 
-static struct snd_kcontrol_new snd_aica_pcmswitch_control = {
+static const struct snd_kcontrol_new snd_aica_pcmswitch_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "PCM Playback Switch",
        .index = 0,
@@ -544,7 +544,7 @@ static struct snd_kcontrol_new snd_aica_pcmswitch_control = {
        .put = aica_pcmswitch_put
 };
 
-static struct snd_kcontrol_new snd_aica_pcmvolume_control = {
+static const struct snd_kcontrol_new snd_aica_pcmvolume_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name = "PCM Playback Volume",
        .index = 0,
index 76b2ab8c2b4a4f964307b9832677ebb8a4961464..4a22aadac29484aae7b4621d7b6c523cd49bb3d7 100644 (file)
@@ -441,7 +441,7 @@ static int siu_dai_put_volume(struct snd_kcontrol *kctrl,
        return 0;
 }
 
-static struct snd_kcontrol_new playback_controls = {
+static const struct snd_kcontrol_new playback_controls = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "PCM Playback Volume",
        .index          = 0,
@@ -451,7 +451,7 @@ static struct snd_kcontrol_new playback_controls = {
        .private_value  = VOLUME_PLAYBACK,
 };
 
-static struct snd_kcontrol_new capture_controls = {
+static const struct snd_kcontrol_new capture_controls = {
        .iface          = SNDRV_CTL_ELEM_IFACE_MIXER,
        .name           = "PCM Capture Volume",
        .index          = 0,
index 4fa0053a40af27673d48cd8bba56eac3be919f8b..e3d1dec48ee49f21d4efe4627fc3c264d76fcfe2 100644 (file)
@@ -362,7 +362,7 @@ static int snd_audigy2nx_led_resume(struct usb_mixer_elem_list *list)
 }
 
 /* name and private_value are set dynamically */
-static struct snd_kcontrol_new snd_audigy2nx_control = {
+static const struct snd_kcontrol_new snd_audigy2nx_control = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
        .info = snd_audigy2nx_led_info,
        .get = snd_audigy2nx_led_get,