ALSA: aoa: Constify snd_device_ops definitions
authorTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:16:27 +0000 (09:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:24:01 +0000 (09:24 +0100)
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>
sound/aoa/aoa.h
sound/aoa/codecs/onyx.c
sound/aoa/codecs/tas.c
sound/aoa/codecs/toonie.c
sound/aoa/core/alsa.c

index 60ce9dedc73705125a5f23c21a0de2c5ef4600fa..3d2d03ff6337dacf9b3d274d0c8d0eb4ebd8286b 100644 (file)
@@ -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);
 
index 9827bee109c1a497a01fc19b8e3a2c16b324daed..83ab3e58a0d361bf6150ec000922b2d47c97b89a 100644 (file)
@@ -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,
 };
 
index 7af6129d1cd7e5b6e12e2578d90178adcb1878b8..c60b78367fc9136a1b349fe5773459f2db56f87e 100644 (file)
@@ -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,
 };
 
index b43469f43d2d643a94c2f417168e587498dbc462..c2d014486c33a0ecb99a0b5146f1ed1ea602d5c1 100644 (file)
@@ -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,
 };
 
index fcf30f0c3adb50287b8c64863ad52ee4d3763dfd..b61081342266e82ecf6cdb64e995c5e52a0235f0 100644 (file)
@@ -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;