Skip to content

Commit

Permalink
ALSA: isa: make snd_pcm_hardware const
Browse files Browse the repository at this point in the history
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
goyalbhumika authored and tiwai committed Aug 17, 2017
1 parent b6c0b71 commit aec5465
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions sound/isa/ad1816a/ad1816a_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id)
}


static struct snd_pcm_hardware snd_ad1816a_playback = {
static const struct snd_pcm_hardware snd_ad1816a_playback = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
.formats = (SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
Expand All @@ -358,7 +358,7 @@ static struct snd_pcm_hardware snd_ad1816a_playback = {
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_ad1816a_capture = {
static const struct snd_pcm_hardware snd_ad1816a_capture = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
.formats = (SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/es1688/es1688_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static snd_pcm_uframes_t snd_es1688_capture_pointer(struct snd_pcm_substream *su
*/

static struct snd_pcm_hardware snd_es1688_playback =
static const struct snd_pcm_hardware snd_es1688_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand All @@ -544,7 +544,7 @@ static struct snd_pcm_hardware snd_es1688_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_es1688_capture =
static const struct snd_pcm_hardware snd_es1688_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/es18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ static snd_pcm_uframes_t snd_es18xx_capture_pointer(struct snd_pcm_substream *su
return pos >> chip->dma1_shift;
}

static struct snd_pcm_hardware snd_es18xx_playback =
static const struct snd_pcm_hardware snd_es18xx_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_RESUME |
Expand All @@ -858,7 +858,7 @@ static struct snd_pcm_hardware snd_es18xx_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_es18xx_capture =
static const struct snd_pcm_hardware snd_es18xx_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_RESUME |
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/gus/gus_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
}
}

static struct snd_pcm_hardware snd_gf1_pcm_playback =
static const struct snd_pcm_hardware snd_gf1_pcm_playback =
{
.info = SNDRV_PCM_INFO_NONINTERLEAVED,
.formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
Expand All @@ -668,7 +668,7 @@ static struct snd_pcm_hardware snd_gf1_pcm_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_gf1_pcm_capture =
static const struct snd_pcm_hardware snd_gf1_pcm_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/msnd/msnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ static void snd_msnd_capture_reset_queue(struct snd_msnd *chip,
}
}

static struct snd_pcm_hardware snd_msnd_playback = {
static const struct snd_pcm_hardware snd_msnd_playback = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand All @@ -456,7 +456,7 @@ static struct snd_pcm_hardware snd_msnd_playback = {
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_msnd_capture = {
static const struct snd_pcm_hardware snd_msnd_capture = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/sb/emu8000_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static int calc_rate_offset(int hz)
/*
*/

static struct snd_pcm_hardware emu8k_pcm_hw = {
static const struct snd_pcm_hardware emu8k_pcm_hw = {
#ifdef USE_NONINTERLEAVE
.info = SNDRV_PCM_INFO_NONINTERLEAVED,
#else
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/sb/sb16_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *subs
*/

static struct snd_pcm_hardware snd_sb16_playback =
static const struct snd_pcm_hardware snd_sb16_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand All @@ -491,7 +491,7 @@ static struct snd_pcm_hardware snd_sb16_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_sb16_capture =
static const struct snd_pcm_hardware snd_sb16_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/sb/sb8_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *subst
*/

static struct snd_pcm_hardware snd_sb8_playback =
static const struct snd_pcm_hardware snd_sb8_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand All @@ -466,7 +466,7 @@ static struct snd_pcm_hardware snd_sb8_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_sb8_capture =
static const struct snd_pcm_hardware snd_sb8_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/wss/wss_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ static int snd_wss_probe(struct snd_wss *chip)
*/

static struct snd_pcm_hardware snd_wss_playback =
static const struct snd_pcm_hardware snd_wss_playback =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand All @@ -1472,7 +1472,7 @@ static struct snd_pcm_hardware snd_wss_playback =
.fifo_size = 0,
};

static struct snd_pcm_hardware snd_wss_capture =
static const struct snd_pcm_hardware snd_wss_capture =
{
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand Down

0 comments on commit aec5465

Please sign in to comment.