media: usb: make snd_pcm_hardware const
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 13 Aug 2017 12:43:08 +0000 (08:43 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:05:10 +0000 (08:05 -0400)
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/cx231xx/cx231xx-audio.c
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/go7007/snd-go7007.c
drivers/media/usb/tm6000/tm6000-alsa.c
drivers/media/usb/usbtv/usbtv-audio.c

index a050d125934c6815c6960a3529d98132caeb1f7d..06f10d7fc4b01daa591a24d6aa08235aeebeba07 100644 (file)
@@ -403,7 +403,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
        return 0;
 }
 
-static struct snd_pcm_hardware snd_cx231xx_hw_capture = {
+static const struct snd_pcm_hardware snd_cx231xx_hw_capture = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER   |
            SNDRV_PCM_INFO_MMAP                 |
            SNDRV_PCM_INFO_INTERLEAVED          |
index ffad7f1af1667cd7ef4a4c95c8239cfd18795e9f..261620a57420bdcf9fe8abfe7b1079536f54f427 100644 (file)
@@ -216,7 +216,7 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs,
        return 0;
 }
 
-static struct snd_pcm_hardware snd_em28xx_hw_capture = {
+static const struct snd_pcm_hardware snd_em28xx_hw_capture = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP           |
                SNDRV_PCM_INFO_INTERLEAVED    |
index 070871fb1fc49e224fd9faf93668270d616f887f..c618764480c67eabc0717e6393208087a26b3156 100644 (file)
@@ -52,7 +52,7 @@ struct go7007_snd {
        int capturing;
 };
 
-static struct snd_pcm_hardware go7007_snd_capture_hw = {
+static const struct snd_pcm_hardware go7007_snd_capture_hw = {
        .info                   = (SNDRV_PCM_INFO_MMAP |
                                        SNDRV_PCM_INFO_INTERLEAVED |
                                        SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 422322541af6c69713cd95e527e253172d40aca2..3717a6844ea8eb9793d67f2f7ab60d12a6e02eb3 100644 (file)
@@ -143,7 +143,7 @@ static int dsp_buffer_alloc(struct snd_pcm_substream *substream, int size)
  */
 #define DEFAULT_FIFO_SIZE      4096
 
-static struct snd_pcm_hardware snd_tm6000_digital_hw = {
+static const struct snd_pcm_hardware snd_tm6000_digital_hw = {
        .info = SNDRV_PCM_INFO_BATCH |
                SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
index 9db31db7d9ac20e7bf6377703033f908d080da50..2c2ca77fa01f8404d1fc66da779403b17aad30c2 100644 (file)
@@ -43,7 +43,7 @@
 
 #include "usbtv.h"
 
-static struct snd_pcm_hardware snd_usbtv_digital_hw = {
+static const struct snd_pcm_hardware snd_usbtv_digital_hw = {
        .info = SNDRV_PCM_INFO_BATCH |
                SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |