Skip to content

Commit

Permalink
ALSA: ac97: Constify snd_ac97_bus_ops definitions
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 3, 2020
1 parent 1926081 commit 33c83aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/ac97/snd_ac97_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static unsigned short compat_ac97_read(struct snd_ac97 *ac97,
return actrl->ops->read(actrl, ac97->num, reg);
}

static struct snd_ac97_bus_ops compat_snd_ac97_bus_ops = {
static const struct snd_ac97_bus_ops compat_snd_ac97_bus_ops = {
.reset = compat_ac97_reset,
.warm_reset = compat_ac97_warm_reset,
.write = compat_ac97_write,
Expand Down

0 comments on commit 33c83aa

Please sign in to comment.