]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
media: pci: make snd_pcm_hardware const
authorBhumika Goyal <bhumirks@gmail.com>
Sun, 13 Aug 2017 12:43:09 +0000 (08:43 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:05:21 +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/pci/cobalt/cobalt-alsa-pcm.c
drivers/media/pci/cx18/cx18-alsa-pcm.c
drivers/media/pci/cx23885/cx23885-alsa.c
drivers/media/pci/cx25821/cx25821-alsa.c
drivers/media/pci/ivtv/ivtv-alsa-pcm.c
drivers/media/pci/saa7134/saa7134-alsa.c

index 49013c6b8646efb42c2c06bfb1f8ff526a4b27c5..b69b258d39b95d525720824373af21cd729d9937 100644 (file)
@@ -43,7 +43,7 @@ MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm");
                        pr_info("cobalt-alsa-pcm %s: " fmt, __func__, ##arg); \
        } while (0)
 
-static struct snd_pcm_hardware snd_cobalt_hdmi_capture = {
+static const struct snd_pcm_hardware snd_cobalt_hdmi_capture = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP           |
                SNDRV_PCM_INFO_INTERLEAVED    |
@@ -64,7 +64,7 @@ static struct snd_pcm_hardware snd_cobalt_hdmi_capture = {
        .periods_max = 4,
 };
 
-static struct snd_pcm_hardware snd_cobalt_playback = {
+static const struct snd_pcm_hardware snd_cobalt_playback = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP           |
                SNDRV_PCM_INFO_INTERLEAVED    |
index f68ee57a9ae2e570e2b904e3bc15ac9afc8f3a47..aadd76466aecb5b90ba4b3eb912654d3baee6781 100644 (file)
@@ -44,7 +44,7 @@ MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm");
                                  __func__, ##arg);                     \
        } while (0)
 
-static struct snd_pcm_hardware snd_cx18_hw_capture = {
+static const struct snd_pcm_hardware snd_cx18_hw_capture = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP           |
                SNDRV_PCM_INFO_INTERLEAVED    |
index c148f9a4a9ac4d46df26c3170a05ef4105e65d49..d8c3637e492e37245c8fb5494e1ed62ffa163039 100644 (file)
@@ -293,7 +293,7 @@ static int dsp_buffer_free(struct cx23885_audio_dev *chip)
  */
 #define DEFAULT_FIFO_SIZE      4096
 
-static struct snd_pcm_hardware snd_cx23885_digital_hw = {
+static const struct snd_pcm_hardware snd_cx23885_digital_hw = {
        .info = SNDRV_PCM_INFO_MMAP |
                SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER |
index 519b81c0c8378fd02733b7bd897a00f8a780148e..2b34990e86f23b9f4da3bf6e491fa4301b72eed5 100644 (file)
@@ -428,7 +428,7 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip)
  * Digital hardware definition
  */
 #define DEFAULT_FIFO_SIZE      384
-static struct snd_pcm_hardware snd_cx25821_digital_hw = {
+static const struct snd_pcm_hardware snd_cx25821_digital_hw = {
        .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID,
        .formats = SNDRV_PCM_FMTBIT_S16_LE,
index 417d03da01f02dad76830ef66f57cff60cddd9c7..5326d86fa3753d6d751fd41924ba94940b1c2c02 100644 (file)
@@ -41,7 +41,7 @@ MODULE_PARM_DESC(pcm_debug, "enable debug messages for pcm");
                        pr_info("ivtv-alsa-pcm %s: " fmt, __func__, ##arg); \
        } while (0)
 
-static struct snd_pcm_hardware snd_ivtv_hw_capture = {
+static const struct snd_pcm_hardware snd_ivtv_hw_capture = {
        .info = SNDRV_PCM_INFO_BLOCK_TRANSFER |
                SNDRV_PCM_INFO_MMAP           |
                SNDRV_PCM_INFO_INTERLEAVED    |
index bf358ec7aca57167429de6843825811c15704e00..c59b69f1af9d935e1c392ad74d8f3e730cdb2fe6 100644 (file)
@@ -627,7 +627,7 @@ snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream)
  *    switching to 32kHz without any frequency translation
  */
 
-static struct snd_pcm_hardware snd_card_saa7134_capture =
+static const struct snd_pcm_hardware snd_card_saa7134_capture =
 {
        .info =                 (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |