* [PATCH 0/3] ALSA: make snd_kcontrol_new const
@ 2017-08-16 8:44 Bhumika Goyal
2017-08-16 8:44 ` [PATCH 1/3] ALSA: aoa: " Bhumika Goyal
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-16 8:44 UTC (permalink / raw)
To: julia.lawall, johannes, perex, tiwai, linuxppc-dev, alsa-devel,
linux-kernel
Cc: Bhumika Goyal
Make these structures const. Done using Coccinelle.
Bhumika Goyal (3):
ALSA: aoa: make snd_kcontrol_new const
ALSA: pcxhr: make snd_kcontrol_new const
ALSA: hda: make snd_kcontrol_new const
sound/aoa/codecs/onyx.c | 12 ++++++------
sound/pci/hda/patch_analog.c | 4 ++--
sound/pci/hda/patch_sigmatel.c | 2 +-
sound/pci/pcxhr/pcxhr_mixer.c | 4 ++--
4 files changed, 11 insertions(+), 11 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] ALSA: aoa: make snd_kcontrol_new const
2017-08-16 8:44 [PATCH 0/3] ALSA: make snd_kcontrol_new const Bhumika Goyal
@ 2017-08-16 8:44 ` Bhumika Goyal
2017-08-16 8:44 ` [PATCH 2/3] ALSA: pcxhr: " Bhumika Goyal
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-16 8:44 UTC (permalink / raw)
To: julia.lawall, johannes, perex, tiwai, linuxppc-dev, alsa-devel,
linux-kernel
Cc: Bhumika Goyal
Make these const as they are only used during a copy operation.
Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/aoa/codecs/onyx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c
index a04edff..d2d96ca 100644
--- a/sound/aoa/codecs/onyx.c
+++ b/sound/aoa/codecs/onyx.c
@@ -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,
@@ -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,
@@ -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
@@ -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,
@@ -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),
@@ -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),
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] ALSA: pcxhr: make snd_kcontrol_new const
2017-08-16 8:44 [PATCH 0/3] ALSA: make snd_kcontrol_new const Bhumika Goyal
2017-08-16 8:44 ` [PATCH 1/3] ALSA: aoa: " Bhumika Goyal
@ 2017-08-16 8:44 ` Bhumika Goyal
2017-08-16 8:44 ` [PATCH 3/3] ALSA: hda: " Bhumika Goyal
2017-08-16 12:41 ` [PATCH 0/3] ALSA: " Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-16 8:44 UTC (permalink / raw)
To: julia.lawall, johannes, perex, tiwai, linuxppc-dev, alsa-devel,
linux-kernel
Cc: Bhumika Goyal
Make these const as they are only used during a copy operation.
Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/pci/pcxhr/pcxhr_mixer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c
index 36875df..d9a1c6c 100644
--- a/sound/pci/pcxhr/pcxhr_mixer.c
+++ b/sound/pci/pcxhr/pcxhr_mixer.c
@@ -185,7 +185,7 @@ static int pcxhr_analog_vol_put(struct snd_kcontrol *kcontrol,
return changed;
}
-static struct snd_kcontrol_new pcxhr_control_analog_level = {
+static const struct snd_kcontrol_new pcxhr_control_analog_level = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
SNDRV_CTL_ELEM_ACCESS_TLV_READ),
@@ -409,7 +409,7 @@ static int pcxhr_pcm_vol_put(struct snd_kcontrol *kcontrol,
return changed;
}
-static struct snd_kcontrol_new snd_pcxhr_pcm_vol =
+static const struct snd_kcontrol_new snd_pcxhr_pcm_vol =
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ALSA: hda: make snd_kcontrol_new const
2017-08-16 8:44 [PATCH 0/3] ALSA: make snd_kcontrol_new const Bhumika Goyal
2017-08-16 8:44 ` [PATCH 1/3] ALSA: aoa: " Bhumika Goyal
2017-08-16 8:44 ` [PATCH 2/3] ALSA: pcxhr: " Bhumika Goyal
@ 2017-08-16 8:44 ` Bhumika Goyal
2017-08-16 12:41 ` [PATCH 0/3] ALSA: " Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-16 8:44 UTC (permalink / raw)
To: julia.lawall, johannes, perex, tiwai, linuxppc-dev, alsa-devel,
linux-kernel
Cc: Bhumika Goyal
Make these const as they are only passed as the 3rd argument to the
function snd_hda_gen_add_kctl, which is of type const.
Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/pci/hda/patch_analog.c | 4 ++--
sound/pci/hda/patch_sigmatel.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index e0fb8c6..7578573 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -505,7 +505,7 @@ static int ad1983_auto_smux_enum_put(struct snd_kcontrol *kcontrol,
return 1;
}
-static struct snd_kcontrol_new ad1983_auto_smux_mixer = {
+static const struct snd_kcontrol_new ad1983_auto_smux_mixer = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "IEC958 Playback Source",
.info = ad1983_auto_smux_enum_info,
@@ -788,7 +788,7 @@ static int ad1988_auto_smux_enum_put(struct snd_kcontrol *kcontrol,
return 1;
}
-static struct snd_kcontrol_new ad1988_auto_smux_mixer = {
+static const struct snd_kcontrol_new ad1988_auto_smux_mixer = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "IEC958 Playback Source",
.info = ad1988_auto_smux_enum_info,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 6cefdf6..63d15b5 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -961,7 +961,7 @@ static int stac_smux_enum_put(struct snd_kcontrol *kcontrol,
&spec->cur_smux[smux_idx]);
}
-static struct snd_kcontrol_new stac_smux_mixer = {
+static const struct snd_kcontrol_new stac_smux_mixer = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "IEC958 Playback Source",
/* count set later */
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] ALSA: make snd_kcontrol_new const
2017-08-16 8:44 [PATCH 0/3] ALSA: make snd_kcontrol_new const Bhumika Goyal
` (2 preceding siblings ...)
2017-08-16 8:44 ` [PATCH 3/3] ALSA: hda: " Bhumika Goyal
@ 2017-08-16 12:41 ` Takashi Iwai
3 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2017-08-16 12:41 UTC (permalink / raw)
To: Bhumika Goyal
Cc: alsa-devel, julia.lawall, linuxppc-dev, perex, johannes, linux-kernel
On Wed, 16 Aug 2017 10:44:08 +0200,
Bhumika Goyal wrote:
>
> Make these structures const. Done using Coccinelle.
>
> Bhumika Goyal (3):
> ALSA: aoa: make snd_kcontrol_new const
> ALSA: pcxhr: make snd_kcontrol_new const
> ALSA: hda: make snd_kcontrol_new const
Applied all three patches now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-16 12:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 8:44 [PATCH 0/3] ALSA: make snd_kcontrol_new const Bhumika Goyal
2017-08-16 8:44 ` [PATCH 1/3] ALSA: aoa: " Bhumika Goyal
2017-08-16 8:44 ` [PATCH 2/3] ALSA: pcxhr: " Bhumika Goyal
2017-08-16 8:44 ` [PATCH 3/3] ALSA: hda: " Bhumika Goyal
2017-08-16 12:41 ` [PATCH 0/3] ALSA: " Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).