]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: pci: Constify snd_device_ops definitions
authorTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:16:25 +0000 (09:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:23:56 +0000 (09:23 +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-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
44 files changed:
sound/pci/ac97/ac97_codec.c
sound/pci/ad1889.c
sound/pci/ak4531_codec.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0.c
sound/pci/aw2/aw2-alsa.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs5530.c
sound/pci/cs5535audio/cs5535audio.c
sound/pci/ctxfi/ctatc.c
sound/pci/echoaudio/echoaudio.c
sound/pci/emu10k1/emu10k1_main.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/es1968.c
sound/pci/fm801.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/lola/lola.c
sound/pci/lx6464es/lx6464es.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/nm256/nm256.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/sis7019.c
sound/pci/sonicvibes.c
sound/pci/trident/trident_main.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/vx222/vx222.c
sound/pci/ymfpci/ymfpci_main.c

index 66f6c3bf08e3196de229fd5d3053177c176fa7f4..41bdec4249e1d6c11c6fc557f77749b0743909cb 100644 (file)
@@ -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,
index 7770157a3a8ccb188af89edf7ca44b42337b7481..3daa978263f6b09dd61560e0d2f8ec286478d97c 100644 (file)
@@ -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,
        };
 
index 7fa8106b50107603b5e1ce222baf899661147a97..fbf9a93a8053b6ab2b792bf166d9dd5ecdb96f0f 100644 (file)
@@ -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,
        };
 
index 434077527b9579e87beb143e9566f76a438e9e75..39c33a944e5d19ead488089caa9dfc6fc3cac9aa 100644 (file)
@@ -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,
         };
 
index 6573a2259cb65bf1d46a0e3330efad922c64fa8f..64d978307755751f75d0cd93193d82178797060c 100644 (file)
@@ -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;
index 684b4f18e52cd497adeb29ecb8da5d121e3ab778..61ae4fe8d646b47828ca7b5602d035015dfc9916 100644 (file)
@@ -1557,7 +1557,7 @@ static int snd_atiixp_create(struct snd_card *card,
                             struct pci_dev *pci,
                             struct atiixp **r_chip)
 {
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_atiixp_dev_free,
        };
        struct atiixp *chip;
index 40cda5c3bfeb6f14e8b665c8febcc09531c739ae..b62cde3a00b2611de6d1559ae36a8cd739213512 100644 (file)
@@ -1187,7 +1187,7 @@ static int snd_atiixp_create(struct snd_card *card,
                             struct pci_dev *pci,
                             struct atiixp_modem **r_chip)
 {
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_atiixp_dev_free,
        };
        struct atiixp_modem *chip;
index c9e0159af2b120ed12ca7b4629f5b39aa4c4425d..be276fb3f5afe4e0e2831d058c0dcbf44ae4c26c 100644 (file)
@@ -142,7 +142,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
 {
        vortex_t *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_vortex_dev_free,
        };
 
index 819b148573a69c41846821208fedd8e413628b6d..b3be98e338452286ef7c85fb789cd5cd7fa4c65a 100644 (file)
@@ -223,7 +223,7 @@ static int snd_aw2_create(struct snd_card *card,
 {
        struct aw2 *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_aw2_dev_free,
        };
 
index b36e7a64e26835c7023e587d881ad56ec071d3ef..810d5772f0976461f230a060d3cb8c27797b63fe 100644 (file)
@@ -2355,7 +2355,7 @@ snd_azf3328_create(struct snd_card *card,
 {
        struct snd_azf3328 *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_azf3328_dev_free,
        };
        u8 dma_init;
index 2e16604c31cec4b78f44ab447c850251f49c63c6..ece3f8971145d7aa033e6054dcc97f588759a12a 100644 (file)
@@ -705,7 +705,7 @@ static int snd_bt87x_create(struct snd_card *card,
 {
        struct snd_bt87x *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_bt87x_dev_free
        };
 
index a14e9b1e50b0b2e5c375c5c495bf271b9492bee6..e65154cecad558420c3b4c8be0768c0c552e9218 100644 (file)
@@ -1595,7 +1595,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card,
        struct snd_ca0106 *chip;
        struct snd_ca0106_details *c;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_ca0106_dev_free,
        };
 
index 266c4cf28b78154735b251c211e58b966fd1a0b6..ff5525722d58a635ca622454931cb4e9c2e57bda 100644 (file)
@@ -2976,7 +2976,7 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci,
 {
        struct cmipci *cm;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_cmipci_dev_free,
        };
        unsigned int val;
index e7294b9d2cb62345e9ec71545b9d44fe0940c51c..75450e329ceef38017360ce0057e85fb18fb9352 100644 (file)
@@ -1304,7 +1304,7 @@ static int snd_cs4281_create(struct snd_card *card,
        struct cs4281 *chip;
        unsigned int tmp;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_cs4281_dev_free,
        };
 
index adfc750bc61cb6ef0f30ad626a594aef2b400eec..6251fa8da939517db7f1d6f77aef194a2634f475 100644 (file)
@@ -3864,7 +3864,7 @@ int snd_cs46xx_create(struct snd_card *card,
        struct snd_cs46xx_region *region;
        struct cs_card_type *cp;
        u16 ss_card, ss_vendor;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_cs46xx_dev_free,
        };
        
index 3ab7ec565071ebcd5f03d6e38f75d163df96697b..20b4faea50a69ccacbe4581793db608dc4953d59 100644 (file)
@@ -104,7 +104,7 @@ static int snd_cs5530_create(struct snd_card *card,
        void __iomem *mem;
        int err;
 
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_cs5530_dev_free,
        };
        *rchip = NULL;
index 15126aff63fc8ccde7f39f4fba69070227d5a66c..930c2ac405e556716726c0df2309e0364102ed56 100644 (file)
@@ -261,7 +261,7 @@ static int snd_cs5535audio_create(struct snd_card *card,
        struct cs5535audio *cs5535au;
 
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_cs5535audio_dev_free,
        };
 
index 055a71b0a643db77b1687114dbdf0cf617ba3633..8d92154ac26264da5c820e6d7e14fb1dc184bfd8 100644 (file)
@@ -1669,7 +1669,7 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
                  struct ct_atc **ratc)
 {
        struct ct_atc *atc;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = atc_dev_free,
        };
        int err;
index abad652a400695d9f5d55075ee8c745323824d32..dae3a853a6e1355246cc0d09b960c4be25724a23 100644 (file)
@@ -1856,7 +1856,7 @@ static int snd_echo_create(struct snd_card *card,
        struct echoaudio *chip;
        int err;
        size_t sz;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_echo_dev_free,
        };
 
index 65e9ec94b80726b493f98db9c4a5ef9a8fc7cf48..6a8fce8ac2180a115a7f472142696dca22cb9439 100644 (file)
@@ -1791,7 +1791,7 @@ int snd_emu10k1_create(struct snd_card *card,
        size_t page_table_size;
        unsigned int silent_page;
        const struct snd_emu_chip_details *c;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_emu10k1_dev_free,
        };
 
index 6467142ec460fd31fb5ea9d2954761bbbbc9f9d6..90ae1c72d663b958479002a274245bf01d5df6df 100644 (file)
@@ -886,7 +886,7 @@ static int snd_emu10k1x_create(struct snd_card *card,
        struct emu10k1x *chip;
        int err;
        int ch;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_emu10k1x_dev_free,
        };
 
index 378141aa7c7d9ef546ae95fe456167c38f21ef31..7611e44e2af591728c27244c25ed2273543eed3e 100644 (file)
@@ -2041,7 +2041,7 @@ static int snd_ensoniq_create(struct snd_card *card,
 {
        struct ensoniq *ensoniq;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_ensoniq_dev_free,
        };
 
index d9fba07d36d099928a92d520a76b6069527a22f9..9d5568509387490089c16989854e980533158617 100644 (file)
@@ -1548,7 +1548,7 @@ static int snd_es1938_create(struct snd_card *card,
 {
        struct es1938 *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_es1938_dev_free,
        };
 
index 3610aa1da94cb4b26eeafaa23505a910eddafb15..43cfdf02048bb34b4c3bcb188c562c4552aa1996 100644 (file)
@@ -2656,7 +2656,7 @@ static int snd_es1968_create(struct snd_card *card,
                             int radio_nr,
                             struct es1968 **chip_ret)
 {
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_es1968_dev_free,
        };
        struct es1968 *chip;
index 152fbc3521234e36eb49eddb86dce2d014601228..bb5cffee5dacd8b34c5de4e2b745fdae4ddd8961 100644 (file)
@@ -1183,7 +1183,7 @@ static int snd_fm801_create(struct snd_card *card,
 {
        struct fm801 *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_fm801_dev_free,
        };
 
index ffacf5e6ac9a8d1039a9cbd0582c9a5699ee98ca..15cb90dceeb83de6267fdce1f20d4240ca022a80 100644 (file)
@@ -2474,7 +2474,7 @@ static int snd_ice1712_create(struct snd_card *card,
 {
        struct snd_ice1712 *ice;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_ice1712_dev_free,
        };
 
index 14e4da08adfd2dddc447a5ef4ad3d63f4a1b7073..628b0581a4fff53f02aca2eb6fbe5a9139c289e1 100644 (file)
@@ -2502,7 +2502,7 @@ static int snd_vt1724_create(struct snd_card *card,
 {
        struct snd_ice1712 *ice;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_vt1724_dev_free,
        };
 
index f88008465c44b2b0eea8ca566c7aaa73a892b0fb..563f3a3e820ee297d1b5c646e693241634f66f88 100644 (file)
@@ -2897,7 +2897,7 @@ static int snd_intel8x0_create(struct snd_card *card,
        unsigned int i;
        unsigned int int_sta_masks;
        struct ichdev *ichdev;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_intel8x0_dev_free,
        };
 
index 2f73b45c845c833cf4d9bb24d2d7a0500cb01beb..c6dc36167a0178d65d7ccb122837d49d2f5d4070 100644 (file)
@@ -1079,7 +1079,7 @@ static int snd_intel8x0m_create(struct snd_card *card,
        unsigned int i;
        unsigned int int_sta_masks;
        struct ichdev *ichdev;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_intel8x0m_dev_free,
        };
        static struct ich_reg_info intel_regs[2] = {
index 5d48ff0b32a74a0c622772bc628576fa37da5a86..f605926a0709b8b9fde7f496ecf1a075e7052e6d 100644 (file)
@@ -2153,7 +2153,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
         struct snd_korg1212 * korg1212;
        const struct firmware *dsp_code;
 
-        static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                 .dev_free = snd_korg1212_dev_free,
         };
 
index e7c620caa935a409edf77b0b52770a49f8f5af87..cdd8db79bcfadd5107a4fc007edf3c016e721523 100644 (file)
@@ -559,7 +559,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci,
        struct lola *chip;
        int err;
        unsigned int dever;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = lola_dev_free,
        };
 
index 7f6b1c6c2afe8d6b3124066ebbe60e9eb08e0499..b92ea074ff2af48ada45158ae757925f41380a33 100644 (file)
@@ -938,7 +938,7 @@ static int snd_lx6464es_create(struct snd_card *card,
        struct lx6464es *chip;
        int err;
 
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_lx6464es_dev_free,
        };
 
index 9f75cc0c01ddf9c28be9dc76e6a72bb5c86da59f..b94e3ec5f1587e573f567ea68615f212cba78aca 100644 (file)
@@ -2522,7 +2522,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
        struct snd_m3 *chip;
        int i, err;
        const struct snd_pci_quirk *quirk;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_m3_dev_free,
        };
 
index 18124bd97d80051ee8420dfbaa645129521bdd44..44009c55532278e95b1aea4f8037479edfcbe647 100644 (file)
@@ -1030,7 +1030,7 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int
 {
        int err;
        struct snd_mixart *chip;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_mixart_chip_dev_free,
        };
 
index 5da28b0adbd92f869f18863dad3fd47b0afd4cad..003a09788572085e7423a28139951156c53bdf34 100644 (file)
@@ -1471,7 +1471,7 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci,
 {
        struct nm256 *chip;
        int err, pval;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_nm256_dev_free,
        };
        u32 addr;
index f4330832e5202f0df333d758d549c6372d19acad..9e59d591217b9df47db6c9a5199e65ca16cb383e 100644 (file)
@@ -1179,7 +1179,7 @@ static int pcxhr_create(struct pcxhr_mgr *mgr,
 {
        int err;
        struct snd_pcxhr *chip;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = pcxhr_chip_dev_free,
        };
 
index af6956e26c2908f2c0f8547bebb11a7ba1a75355..6617bc347bfb4991ba518045b5ca37c1e9a0ad2a 100644 (file)
@@ -1824,7 +1824,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci,
        struct snd_riptide *chip;
        struct riptideport *hwport;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = snd_riptide_dev_free,
        };
 
index 515598e3cacfc929b7e443e5027d49ad904755a8..2e351bf1d79264c749cd4f17c60c5c72cfaf3965 100644 (file)
@@ -1280,7 +1280,7 @@ static int sis_chip_create(struct snd_card *card,
 {
        struct sis7019 *sis = card->private_data;
        struct voice *voice;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free = sis_dev_free,
        };
        int rc;
index a2bff9431512182210a6b97a3d94360b7808135b..dcdf5a534c4e7bee3a2c4d253daedaa21009e63e 100644 (file)
@@ -1221,7 +1221,7 @@ static int snd_sonicvibes_create(struct snd_card *card,
        struct sonicvibes *sonic;
        unsigned int dmaa, dmac;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_sonicvibes_dev_free,
        };
 
index 0d039eacbf0a70e536a92372402517dbc0a6ba22..ba4a9fcd5eba22b4ddb03e7ade3be688849a2522 100644 (file)
@@ -3487,7 +3487,7 @@ int snd_trident_create(struct snd_card *card,
        int i, err;
        struct snd_trident_voice *voice;
        struct snd_trident_pcm_mixer *tmix;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_trident_dev_free,
        };
 
index e72050a9ffdb0c8cdbeb9bcfe9d19213bd5e301a..090b0c47fbdd329389b1d3dbe41d0bb34bb88408 100644 (file)
@@ -2332,7 +2332,7 @@ static int snd_via82xx_create(struct snd_card *card,
 {
        struct via82xx *chip;
        int err;
-        static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_via82xx_dev_free,
         };
 
index 4e0858f8e372ebf70de6d6e7c52f6056c4491503..7f138fa4e141e78e95984f0a336061af62f2b534 100644 (file)
@@ -1074,7 +1074,7 @@ static int snd_via82xx_create(struct snd_card *card,
 {
        struct via82xx_modem *chip;
        int err;
-        static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_via82xx_dev_free,
         };
 
index bc451224df168479c3fa243f9d94bf76d89bf640..b278c72797d53a1b6bd16a08944f16955e58c91a 100644 (file)
@@ -128,7 +128,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
        struct vx_core *chip;
        struct snd_vx222 *vx;
        int i, err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_vx222_dev_free,
        };
        struct snd_vx_ops *vx_ops;
index 3bc92d236508f608d859352694b2dadc1cb9299a..2e20cd9d8cfcd96b43911f785eb7baf2999457de 100644 (file)
@@ -2327,7 +2327,7 @@ int snd_ymfpci_create(struct snd_card *card,
 {
        struct snd_ymfpci *chip;
        int err;
-       static struct snd_device_ops ops = {
+       static const struct snd_device_ops ops = {
                .dev_free =     snd_ymfpci_dev_free,
        };