Commit efb0ad25 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: pci: Constify snd_device_ops definitions

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 41f394a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1899,7 +1899,7 @@ int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops,
{
	int err;
	struct snd_ac97_bus *bus;
	static struct snd_device_ops dev_ops = {
	static const struct snd_device_ops dev_ops = {
		.dev_free =	snd_ac97_bus_dev_free,
	};

@@ -1999,7 +1999,7 @@ int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template,
	unsigned long end_time;
	unsigned int reg;
	const struct ac97_codec_id *pid;
	static struct snd_device_ops ops = {
	static const struct snd_device_ops ops = {
		.dev_free =	snd_ac97_dev_free,
		.dev_register =	snd_ac97_dev_register,
		.dev_disconnect =	snd_ac97_dev_disconnect,
+1 −1
Original line number Diff line number Diff line
@@ -847,7 +847,7 @@ snd_ad1889_create(struct snd_card *card,
	int err;

	struct snd_ad1889 *chip;
	static struct snd_device_ops ops = {
	static const struct snd_device_ops ops = {
		.dev_free = snd_ad1889_dev_free,
	};

+1 −1
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ int snd_ak4531_mixer(struct snd_card *card,
	unsigned int idx;
	int err;
	struct snd_ak4531 *ak4531;
	static struct snd_device_ops ops = {
	static const struct snd_device_ops ops = {
		.dev_free =	snd_ak4531_dev_free,
	};

+1 −1
Original line number Diff line number Diff line
@@ -2046,7 +2046,7 @@ static int snd_ali_create(struct snd_card *card,
	struct snd_ali *codec;
	int i, err;
	unsigned short cmdw;
	static struct snd_device_ops ops = {
	static const struct snd_device_ops ops = {
		.dev_free = snd_ali_dev_free,
        };

+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ static int snd_als300_create(struct snd_card *card,
	void *irq_handler;
	int err;

	static struct snd_device_ops ops = {
	static const struct snd_device_ops ops = {
		.dev_free = snd_als300_dev_free,
	};
	*rchip = NULL;
Loading