diff mbox series

[24/58] ALSA: arm: Constify snd_ac97_bus_ops definitions

Message ID 20200103081714.9560-25-tiwai@suse.de
State Accepted
Commit 74d2bae3434aef8e63d395559b25988275f81885
Headers show
Series [01/58] ALSA: pci: Constify snd_pcm_hardware definitions | expand

Commit Message

Takashi Iwai Jan. 3, 2020, 8:16 a.m. UTC
Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/arm/aaci.c        | 2 +-
 sound/arm/pxa2xx-ac97.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index d1b5dbcd9e87..d663bd7adae6 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -811,7 +811,7 @@  static const struct ac97_pcm ac97_defs[] = {
 	}
 };
 
-static struct snd_ac97_bus_ops aaci_bus_ops = {
+static const struct snd_ac97_bus_ops aaci_bus_ops = {
 	.write	= aaci_ac97_write,
 	.read	= aaci_ac97_read,
 };
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 08ae55166890..ea8e233150c8 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -52,7 +52,7 @@  static void pxa2xx_ac97_legacy_write(struct snd_ac97 *ac97,
 	ret = pxa2xx_ac97_write(ac97->num, reg, val);
 }
 
-static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
+static const struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
 	.read	= pxa2xx_ac97_legacy_read,
 	.write	= pxa2xx_ac97_legacy_write,
 	.reset	= pxa2xx_ac97_legacy_reset,