ALSA: drivers: Constify snd_ac97_bus_ops definitions
authorTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:16:42 +0000 (09:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:24:12 +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-27-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/ml403-ac97cr.c

index 2cec7c5..0a039bf 100644 (file)
@@ -1172,7 +1172,7 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr)
        struct snd_ac97_bus *bus;
        struct snd_ac97_template ac97;
        int err;
        struct snd_ac97_bus *bus;
        struct snd_ac97_template ac97;
        int err;
-       static struct snd_ac97_bus_ops ops = {
+       static const struct snd_ac97_bus_ops ops = {
                .write = snd_ml403_ac97cr_codec_write,
                .read = snd_ml403_ac97cr_codec_read,
        };
                .write = snd_ml403_ac97cr_codec_write,
                .read = snd_ml403_ac97cr_codec_read,
        };