Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: aoa: 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-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+5 -5
+1 -1
sound/aoa/aoa.h
··· 116 116 }; 117 117 118 118 extern int aoa_snd_device_new(enum snd_device_type type, 119 - void * device_data, struct snd_device_ops * ops); 119 + void *device_data, const struct snd_device_ops *ops); 120 120 extern struct snd_card *aoa_get_card(void); 121 121 extern int aoa_snd_ctl_add(struct snd_kcontrol* control); 122 122
+1 -1
sound/aoa/codecs/onyx.c
··· 97 97 return 0; 98 98 } 99 99 100 - static struct snd_device_ops ops = { 100 + static const struct snd_device_ops ops = { 101 101 .dev_register = onyx_dev_register, 102 102 }; 103 103
+1 -1
sound/aoa/codecs/tas.c
··· 217 217 return 0; 218 218 } 219 219 220 - static struct snd_device_ops ops = { 220 + static const struct snd_device_ops ops = { 221 221 .dev_register = tas_dev_register, 222 222 }; 223 223
+1 -1
sound/aoa/codecs/toonie.c
··· 30 30 return 0; 31 31 } 32 32 33 - static struct snd_device_ops ops = { 33 + static const struct snd_device_ops ops = { 34 34 .dev_register = toonie_dev_register, 35 35 }; 36 36
+1 -1
sound/aoa/core/alsa.c
··· 59 59 } 60 60 61 61 int aoa_snd_device_new(enum snd_device_type type, 62 - void * device_data, struct snd_device_ops * ops) 62 + void *device_data, const struct snd_device_ops *ops) 63 63 { 64 64 struct snd_card *card = aoa_get_card(); 65 65 int err;