]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: arm: Constify snd_ac97_bus_ops definitions
authorTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:16:40 +0000 (09:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:24:11 +0000 (09:24 +0100)
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.

Link: https://lore.kernel.org/r/20200103081714.9560-25-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/arm/aaci.c
sound/arm/pxa2xx-ac97.c

index d1b5dbcd9e87e6004115aa4157a4f9b53913d5b3..d663bd7adae69fe1f016fbb044fd48d1de327dff 100644 (file)
@@ -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,
 };
index 08ae5516689080fe02d2e6c624454999e046a351..ea8e233150c8d6ef0b84ecd8b08af83b053b7e77 100644 (file)
@@ -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,