diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-01-03 09:16:38 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-01-03 09:24:08 +0100 |
commit | 19260818a9747768b09c1c1f10b4125b4d00595e (patch) | |
tree | 507e3c28cdadc37f040d0c50e2636116e54c752d /include/sound/ac97_codec.h | |
parent | 5ff16a3d48ef58be8fd93035ae9272d4cc990c49 (diff) | |
download | linux-rpi-19260818a9747768b09c1c1f10b4125b4d00595e.tar.gz linux-rpi-19260818a9747768b09c1c1f10b4125b4d00595e.tar.bz2 linux-rpi-19260818a9747768b09c1c1f10b4125b4d00595e.zip |
ALSA: ac97: Treat snd_ac97_bus_ops as const
This is a preliminary patch to allow const for snd_ac97_bus_ops
definitions in each driver's code. The ops reference is read-only,
hence it can be declared as const for further optimization.
There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-23-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/ac97_codec.h')
-rw-r--r-- | include/sound/ac97_codec.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index cc383991c0fe..49200ec26dc4 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h @@ -197,7 +197,7 @@ struct snd_ac97_bus_ops { struct snd_ac97_bus { /* -- lowlevel (hardware) driver specific -- */ - struct snd_ac97_bus_ops *ops; + const struct snd_ac97_bus_ops *ops; void *private_data; void (*private_free) (struct snd_ac97_bus *bus); /* --- */ @@ -310,7 +310,8 @@ static inline int ac97_can_spdif(struct snd_ac97 * ac97) /* functions */ /* create new AC97 bus */ -int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, +int snd_ac97_bus(struct snd_card *card, int num, + const struct snd_ac97_bus_ops *ops, void *private_data, struct snd_ac97_bus **rbus); /* create mixer controls */ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, |