* [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst
@ 2017-09-19 11:14 Bhumika Goyal
2017-09-19 20:06 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-09-19 11:14 UTC (permalink / raw)
To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal
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>
---
sound/core/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index 1ac0c42..5603e49 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -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,
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst
2017-09-19 11:14 [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst Bhumika Goyal
@ 2017-09-19 20:06 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-09-19 20:06 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: alsa-devel, julia.lawall, perex, linux-kernel
On Tue, 19 Sep 2017 13:14:38 +0200,
Bhumika Goyal wrote:
>
> 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>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-19 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 11:14 [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst Bhumika Goyal
2017-09-19 20:06 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®