Skip to content

Commit

Permalink
ALSA: sparc: 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 cd196fe commit 688ed20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sound/sparc/amd7930.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static snd_pcm_uframes_t snd_amd7930_capture_pointer(struct snd_pcm_substream *s
}

/* Playback and capture have identical properties. */
static struct snd_pcm_hardware snd_amd7930_pcm_hw =
static const struct snd_pcm_hardware snd_amd7930_pcm_hw =
{
.info = (SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
Expand Down
4 changes: 2 additions & 2 deletions sound/sparc/cs4231.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ static int snd_cs4231_probe(struct snd_cs4231 *chip)
return 0; /* all things are ok.. */
}

static struct snd_pcm_hardware snd_cs4231_playback = {
static const struct snd_pcm_hardware snd_cs4231_playback = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand All @@ -1113,7 +1113,7 @@ static struct snd_pcm_hardware snd_cs4231_playback = {
.periods_max = 1024,
};

static struct snd_pcm_hardware snd_cs4231_capture = {
static const struct snd_pcm_hardware snd_cs4231_capture = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID |
Expand Down
2 changes: 1 addition & 1 deletion sound/sparc/dbri.c
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ static irqreturn_t snd_dbri_interrupt(int irq, void *dev_id)
/****************************************************************************
PCM Interface
****************************************************************************/
static struct snd_pcm_hardware snd_dbri_pcm_hw = {
static const struct snd_pcm_hardware snd_dbri_pcm_hw = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
Expand Down

0 comments on commit 688ed20

Please sign in to comment.