]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: pci: Constify snd_pcm_hardware definitions
authorTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:16:17 +0000 (09:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 3 Jan 2020 08:23:47 +0000 (09:23 +0100)
Most of snd_pcm_hardware definitions are just copied to another object
as-is, hence we can define them as const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 files changed:
sound/pci/ali5451/ali5451.c
sound/pci/echoaudio/darla20.c
sound/pci/echoaudio/darla24.c
sound/pci/echoaudio/echo3g.c
sound/pci/echoaudio/gina20.c
sound/pci/echoaudio/gina24.c
sound/pci/echoaudio/indigo.c
sound/pci/echoaudio/indigodj.c
sound/pci/echoaudio/indigodjx.c
sound/pci/echoaudio/indigoio.c
sound/pci/echoaudio/indigoiox.c
sound/pci/echoaudio/layla20.c
sound/pci/echoaudio/layla24.c
sound/pci/echoaudio/mia.c
sound/pci/echoaudio/mona.c
sound/pci/nm256/nm256.c
sound/pci/rme9652/hdspm.c

index 9f78cf9e0b472b283c36f4428a57e8ae72537ca2..434077527b9579e87beb143e9566f76a438e9e75 100644 (file)
@@ -1400,7 +1400,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)
        return cso;
 }
 
-static struct snd_pcm_hardware snd_ali_playback =
+static const struct snd_pcm_hardware snd_ali_playback =
 {
        .info =         (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                         SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1426,7 +1426,7 @@ static struct snd_pcm_hardware snd_ali_playback =
  *  Capture support device description
  */
 
-static struct snd_pcm_hardware snd_ali_capture =
+static const struct snd_pcm_hardware snd_ali_capture =
 {
        .info =         (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                         SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1457,7 +1457,7 @@ static void snd_ali_pcm_free_substream(struct snd_pcm_runtime *runtime)
 }
 
 static int snd_ali_open(struct snd_pcm_substream *substream, int rec,
-                       int channel, struct snd_pcm_hardware *phw)
+                       int channel, const struct snd_pcm_hardware *phw)
 {
        struct snd_ali *codec = snd_pcm_substream_chip(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
@@ -1537,7 +1537,7 @@ static int snd_ali_modem_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static struct snd_pcm_hardware snd_ali_modem =
+static const struct snd_pcm_hardware snd_ali_modem =
 {
        .info =         (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                         SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 0f1c65d701f9975827ea076296b2b7cede66e05d..e295c71c7a3903725ca08d037d38e6a3c083a4fe 100644 (file)
@@ -56,7 +56,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 6dd7bfd643dad8ddf3795c246852d58f173808e7..ae816e78f5991fd115d0a605d99d58ca8acdf277 100644 (file)
@@ -61,7 +61,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 8a03c4bb9f4c2292d98f25d97ce44de22583264b..3d37bb4030ec2ea40c2aaf6adc27e8fd10e8e8e6 100644 (file)
@@ -74,7 +74,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index fa1208f4031f3ec9e88779b4177ed97991baa6ae..4f864ddc95309e77fe8eda1d7739647e5eede304 100644 (file)
@@ -60,7 +60,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 3089c3221a255f42e2f68ccc949b14d41dcc39b9..eff69e83ca0a1b793afe015a29b43d18d0eeb3c7 100644 (file)
@@ -81,7 +81,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 0e85070b305e5a292f017ba24f6cf67cb8cb617a..a9f2efc58f6e0ffb549c776387aab099847358fe 100644 (file)
@@ -61,7 +61,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 0ad022137e53935e77643385eadea3caf4cb70c9..14e9769ceba141921c67ec4e9ef76dddac3a65de 100644 (file)
@@ -61,7 +61,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 38f17d39e53a2e9027e72767a7da8600a3408704..a14a7dc8c87db0c0288c1ce42e4acd3bb951569d 100644 (file)
@@ -61,7 +61,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 29e0137feb024e27f905d604914faf21a0eda487..97e024450d19c87b0751f725abd70d82aeec8a7e 100644 (file)
@@ -62,7 +62,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index f5c9ef6148adb3ae4d54fae1c17c0c4d8b8377e7..a017c966b4dced4c052a7dd773d841c3355eb473 100644 (file)
@@ -62,7 +62,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 74906c35c6626306514e200e00a874716fdad747..7e38bc9c025d5487e037bdcd16408f7cad71da40 100644 (file)
@@ -70,7 +70,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 69742326f1885c7f35610c65c8d85de477119e35..95c52210fb6540d85db5db12d6da0cc1090278a2 100644 (file)
@@ -80,7 +80,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index ee9722db62f50effbec9dfa1245752a459909264..a2d4b0003b570ed745876c2dd187699ce4092d3f 100644 (file)
@@ -71,7 +71,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 3e5747ea4860fe7c761bfbf36fb9fed97deedfbd..1b45a2b5066fec443faca65d0d63d89d8f359acf 100644 (file)
@@ -90,7 +90,7 @@ static const struct pci_device_id snd_echo_ids[] = {
        {0,}
 };
 
-static struct snd_pcm_hardware pcm_hardware_skel = {
+static const struct snd_pcm_hardware pcm_hardware_skel = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index ac194485aa78a58356c33f596a0c5fa7f4615188..5da28b0adbd92f869f18863dad3fd47b0afd4cad 100644 (file)
@@ -785,7 +785,7 @@ snd_nm256_capture_update(struct nm256 *chip)
 /*
  * hardware info
  */
-static struct snd_pcm_hardware snd_nm256_playback =
+static const struct snd_pcm_hardware snd_nm256_playback =
 {
        .info =                 SNDRV_PCM_INFO_MMAP_IOMEM |SNDRV_PCM_INFO_MMAP_VALID |
                                SNDRV_PCM_INFO_INTERLEAVED |
@@ -804,7 +804,7 @@ static struct snd_pcm_hardware snd_nm256_playback =
        .period_bytes_max =     128 * 1024,
 };
 
-static struct snd_pcm_hardware snd_nm256_capture =
+static const struct snd_pcm_hardware snd_nm256_capture =
 {
        .info =                 SNDRV_PCM_INFO_MMAP_IOMEM | SNDRV_PCM_INFO_MMAP_VALID |
                                SNDRV_PCM_INFO_INTERLEAVED |
@@ -838,7 +838,7 @@ static int snd_nm256_pcm_hw_params(struct snd_pcm_substream *substream,
  */
 static void snd_nm256_setup_stream(struct nm256 *chip, struct nm256_stream *s,
                                   struct snd_pcm_substream *substream,
-                                  struct snd_pcm_hardware *hw_ptr)
+                                  const struct snd_pcm_hardware *hw_ptr)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
 
index 56ae14c90a2c6f424d4e37a333d77f973fe8f398..9e3263395f98bb331b0205207d93c03b87933156 100644 (file)
@@ -5820,7 +5820,7 @@ static int snd_hdspm_prepare(struct snd_pcm_substream *substream)
        return 0;
 }
 
-static struct snd_pcm_hardware snd_hdspm_playback_subinfo = {
+static const struct snd_pcm_hardware snd_hdspm_playback_subinfo = {
        .info = (SNDRV_PCM_INFO_MMAP |
                 SNDRV_PCM_INFO_MMAP_VALID |
                 SNDRV_PCM_INFO_NONINTERLEAVED |
@@ -5845,7 +5845,7 @@ static struct snd_pcm_hardware snd_hdspm_playback_subinfo = {
        .fifo_size = 0
 };
 
-static struct snd_pcm_hardware snd_hdspm_capture_subinfo = {
+static const struct snd_pcm_hardware snd_hdspm_capture_subinfo = {
        .info = (SNDRV_PCM_INFO_MMAP |
                 SNDRV_PCM_INFO_MMAP_VALID |
                 SNDRV_PCM_INFO_NONINTERLEAVED |