Commit 51055da5 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pci: Constify snd_ac97_bus_ops definitions

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-28-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6e6598db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -760,7 +760,7 @@ snd_ad1889_ac97_init(struct snd_ad1889 *chip, const char *quirk_override)
{
	int err;
	struct snd_ac97_template ac97;
	static struct snd_ac97_bus_ops ops = {
	static const struct snd_ac97_bus_ops ops = {
		.write = snd_ad1889_ac97_write,
		.read = snd_ad1889_ac97_read,
	};
+1 −1
Original line number Diff line number Diff line
@@ -1791,7 +1791,7 @@ static int snd_ali_mixer(struct snd_ali *codec)
	struct snd_ac97_template ac97;
	unsigned int idx;
	int i, err;
	static struct snd_ac97_bus_ops ops = {
	static const struct snd_ac97_bus_ops ops = {
		.write = snd_ali_codec_write,
		.read = snd_ali_codec_read,
	};
+1 −1
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ static int snd_als300_ac97(struct snd_als300 *chip)
	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_als300_ac97_write,
		.read = snd_als300_ac97_read,
	};
+1 −1
Original line number Diff line number Diff line
@@ -1403,7 +1403,7 @@ static int snd_atiixp_mixer_new(struct atiixp *chip, int clock,
	struct snd_ac97_template ac97;
	int i, err;
	int codec_count;
	static struct snd_ac97_bus_ops ops = {
	static const struct snd_ac97_bus_ops ops = {
		.write = snd_atiixp_ac97_write,
		.read = snd_atiixp_ac97_read,
	};
+1 −1
Original line number Diff line number Diff line
@@ -1046,7 +1046,7 @@ static int snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock)
	struct snd_ac97_template ac97;
	int i, err;
	int codec_count;
	static struct snd_ac97_bus_ops ops = {
	static const struct snd_ac97_bus_ops ops = {
		.write = snd_atiixp_ac97_write,
		.read = snd_atiixp_ac97_read,
	};
Loading