ALSA: dummy: constify dummy_timer_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 30 Dec 2015 11:28:49 +0000 (12:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 30 Dec 2015 21:49:42 +0000 (22:49 +0100)
The dummy_timer_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/dummy.c

index 016e451ed50616017581b9ec8cbd252d7eeefadb..75b74850c00535ee320f3827e094d9d4da1e30e3 100644 (file)
@@ -351,7 +351,7 @@ static void dummy_systimer_free(struct snd_pcm_substream *substream)
        kfree(substream->runtime->private_data);
 }
 
-static struct dummy_timer_ops dummy_systimer_ops = {
+static const struct dummy_timer_ops dummy_systimer_ops = {
        .create =       dummy_systimer_create,
        .free =         dummy_systimer_free,
        .prepare =      dummy_systimer_prepare,
@@ -475,7 +475,7 @@ static void dummy_hrtimer_free(struct snd_pcm_substream *substream)
        kfree(dpcm);
 }
 
-static struct dummy_timer_ops dummy_hrtimer_ops = {
+static const struct dummy_timer_ops dummy_hrtimer_ops = {
        .create =       dummy_hrtimer_create,
        .free =         dummy_hrtimer_free,
        .prepare =      dummy_hrtimer_prepare,