ALSA: hrtimer: make hrtimer_hw const and __initconst
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 19 Sep 2017 11:14:38 +0000 (16:44 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 Sep 2017 20:06:11 +0000 (22:06 +0200)
Make this const as it is only used during a copy operation. Also, make
it __initconst as it is only used during the init phase and after this
it is not referenced anywhere.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/hrtimer.c

index 1ac0c42..5603e49 100644 (file)
@@ -127,7 +127,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
        return 0;
 }
 
-static struct snd_timer_hardware hrtimer_hw = {
+static const struct snd_timer_hardware hrtimer_hw __initconst = {
        .flags =        SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
        .open =         snd_hrtimer_open,
        .close =        snd_hrtimer_close,