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>
This commit is contained in:
parent
c0a142e21b
commit
e6f2a617ac
@ -116,7 +116,7 @@ struct aoa_card {
|
||||
};
|
||||
|
||||
extern int aoa_snd_device_new(enum snd_device_type type,
|
||||
void * device_data, struct snd_device_ops * ops);
|
||||
void *device_data, const struct snd_device_ops *ops);
|
||||
extern struct snd_card *aoa_get_card(void);
|
||||
extern int aoa_snd_ctl_add(struct snd_kcontrol* control);
|
||||
|
||||
|
@ -97,7 +97,7 @@ static int onyx_dev_register(struct snd_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_device_ops ops = {
|
||||
static const struct snd_device_ops ops = {
|
||||
.dev_register = onyx_dev_register,
|
||||
};
|
||||
|
||||
|
@ -217,7 +217,7 @@ static int tas_dev_register(struct snd_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_device_ops ops = {
|
||||
static const struct snd_device_ops ops = {
|
||||
.dev_register = tas_dev_register,
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ static int toonie_dev_register(struct snd_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_device_ops ops = {
|
||||
static const struct snd_device_ops ops = {
|
||||
.dev_register = toonie_dev_register,
|
||||
};
|
||||
|
||||
|
@ -59,7 +59,7 @@ void aoa_alsa_cleanup(void)
|
||||
}
|
||||
|
||||
int aoa_snd_device_new(enum snd_device_type type,
|
||||
void * device_data, struct snd_device_ops * ops)
|
||||
void *device_data, const struct snd_device_ops *ops)
|
||||
{
|
||||
struct snd_card *card = aoa_get_card();
|
||||
int err;
|
||||
|
Loading…
Reference in New Issue
Block a user