constify ac97_pcm structures
PATCH 1/4 ALSA: aaci: constify ac97_pcm structures
In reply to Arvind Yadavac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const.
--- sound/arm/aaci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/arm/aaci.c +1 -1
@@ -786,7 +786,7 @@ static int aaci_resume(struct device *dev)#endif -static struct ac97_pcm ac97_defs[] = { +static const struct ac97_pcm ac97_defs[] = { [0 ] = {/* Front PCM */ .exclusive =1 , .r = {
Signature · 1 line
1.9.1
PATCH 2/4 ALSA: ac97c: constify ac97_pcm structures
In reply to Arvind Yadavac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const.
--- sound/atmel/ac97c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/atmel/ac97c.c +1 -1
@@ -558,7 +558,7 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev)return retval; } -static struct ac97_pcm at91_ac97_pcm_defs[] = { +static const struct ac97_pcm at91_ac97_pcm_defs[] = {/* Playback */ { .exclusive =1 ,
Signature · 1 line
1.9.1
PATCH 3/4 ALSA: atiixp: constify ac97_pcm structures
In reply to Arvind Yadavac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const.
--- sound/pci/atiixp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/atiixp.c +1 -1
@@ -1183,7 +1183,7 @@ static int snd_atiixp_spdif_close(struct snd_pcm_substream *substream) .pointer = snd_atiixp_pcm_pointer, }; -static struct ac97_pcm atiixp_pcm_defs[] = { +static const struct ac97_pcm atiixp_pcm_defs[] = {/* front PCM */ { .exclusive =1 ,
Signature · 1 line
1.9.1
PATCH 4/4 ALSA: intel8x0: constify ac97_pcm structures
In reply to Arvind Yadavac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const.
--- sound/pci/intel8x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/intel8x0.c +1 -1
@@ -1721,7 +1721,7 @@ static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97) chip->ac97[ac97->num] =NULL ; } -static struct ac97_pcm ac97_pcm_defs[] = { +static const struct ac97_pcm ac97_pcm_defs[] = {/* front PCM */ { .exclusive =1 ,
Signature · 1 line
1.9.1
cover constify ac97_pcm structures
ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const.
Arvind Yadav (4):
[PATCH 1/4] ALSA: aaci: constify ac97_pcm structures [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures
sound/arm/aaci.c | 2 +- sound/atmel/ac97c.c | 2 +- sound/pci/atiixp.c | 2 +- sound/pci/intel8x0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
Takashi Iwai
AppliedQuoted 10 lines · Arvind Yadav
ac97_pcmare not supposed to change at runtime. All functions working withac97_pcmprovided by <sound/ac97_codec.h> work with constac97_pcm. So mark the non-const structs as const.Arvind Yadav (4):
[PATCH 1/4] ALSA: aaci: constifyac97_pcmstructures [PATCH 2/4] ALSA: ac97c: constifyac97_pcmstructures [PATCH 3/4] ALSA: atiixp: constifyac97_pcmstructures [PATCH 4/4] ALSA: intel8x0: constifyac97_pcmstructures
Applied all patches now. Thanks.
Takashi