diff mbox series

[20/58] ALSA: timer: Constify snd_timer_hardware definitions

Message ID 20200103081714.9560-21-tiwai@suse.de
State Accepted
Commit df76996a2c5369769b23a017b6303f7ecacb277b
Headers show
Series [01/58] ALSA: pci: Constify snd_pcm_hardware definitions | expand

Commit Message

Takashi Iwai Jan. 3, 2020, 8:16 a.m. UTC
Most of snd_timer_hardware definitions do simply copying to another
struct as-is.  Mark them as const for further optimization.

There should be no functional changes by this patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/core/pcm_timer.c | 2 +-
 sound/core/timer.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index 7928bda235c1..c43484b22b34 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -75,7 +75,7 @@  static int snd_pcm_timer_stop(struct snd_timer * timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_pcm_timer =
+static const struct snd_timer_hardware snd_pcm_timer =
 {
 	.flags =	SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_SLAVE,
 	.resolution =	0,
diff --git a/sound/core/timer.c b/sound/core/timer.c
index d53bc1f3a48a..8835ff91a893 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1199,7 +1199,7 @@  static int snd_timer_s_close(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_timer_system =
+static const struct snd_timer_hardware snd_timer_system =
 {
 	.flags =	SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET,
 	.resolution =	1000000000L / HZ,