Commit 04bab350 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Takashi Iwai

ALSA: usb-audio: constify snd_kcontrol_new structures

Declare snd_kcontrol_new structures as const as they are only passed as
an argument to the function add_new_ctl. This agrument is of type const,
so snd_kcontrol_new structures having this property can be made const
too.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f3b827e0
...@@ -477,7 +477,7 @@ static int scarlett_ctl_meter_get(struct snd_kcontrol *kctl, ...@@ -477,7 +477,7 @@ static int scarlett_ctl_meter_get(struct snd_kcontrol *kctl,
return 0; return 0;
} }
static struct snd_kcontrol_new usb_scarlett_ctl_switch = { static const struct snd_kcontrol_new usb_scarlett_ctl_switch = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "", .name = "",
.info = scarlett_ctl_switch_info, .info = scarlett_ctl_switch_info,
...@@ -487,7 +487,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_switch = { ...@@ -487,7 +487,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_switch = {
static const DECLARE_TLV_DB_SCALE(db_scale_scarlett_gain, -12800, 100, 0); static const DECLARE_TLV_DB_SCALE(db_scale_scarlett_gain, -12800, 100, 0);
static struct snd_kcontrol_new usb_scarlett_ctl = { static const struct snd_kcontrol_new usb_scarlett_ctl = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
SNDRV_CTL_ELEM_ACCESS_TLV_READ, SNDRV_CTL_ELEM_ACCESS_TLV_READ,
...@@ -499,7 +499,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl = { ...@@ -499,7 +499,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl = {
.tlv = { .p = db_scale_scarlett_gain } .tlv = { .p = db_scale_scarlett_gain }
}; };
static struct snd_kcontrol_new usb_scarlett_ctl_master = { static const struct snd_kcontrol_new usb_scarlett_ctl_master = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
SNDRV_CTL_ELEM_ACCESS_TLV_READ, SNDRV_CTL_ELEM_ACCESS_TLV_READ,
...@@ -511,7 +511,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_master = { ...@@ -511,7 +511,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_master = {
.tlv = { .p = db_scale_scarlett_gain } .tlv = { .p = db_scale_scarlett_gain }
}; };
static struct snd_kcontrol_new usb_scarlett_ctl_enum = { static const struct snd_kcontrol_new usb_scarlett_ctl_enum = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "", .name = "",
.info = scarlett_ctl_enum_info, .info = scarlett_ctl_enum_info,
...@@ -519,7 +519,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_enum = { ...@@ -519,7 +519,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_enum = {
.put = scarlett_ctl_enum_put, .put = scarlett_ctl_enum_put,
}; };
static struct snd_kcontrol_new usb_scarlett_ctl_dynamic_enum = { static const struct snd_kcontrol_new usb_scarlett_ctl_dynamic_enum = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "", .name = "",
.info = scarlett_ctl_enum_dynamic_info, .info = scarlett_ctl_enum_dynamic_info,
...@@ -527,7 +527,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_dynamic_enum = { ...@@ -527,7 +527,7 @@ static struct snd_kcontrol_new usb_scarlett_ctl_dynamic_enum = {
.put = scarlett_ctl_enum_put, .put = scarlett_ctl_enum_put,
}; };
static struct snd_kcontrol_new usb_scarlett_ctl_sync = { static const struct snd_kcontrol_new usb_scarlett_ctl_sync = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.name = "", .name = "",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment