Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698763 > unrolled thread

[PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-07-28 15:10 +0200
Last post2017-07-28 15:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures Bhumika Goyal <bhumirks@gmail.com> - 2017-07-28 15:10 +0200

#1698763 — [PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-07-28 15:10 +0200
Subject[PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures
Message-ID<u8dbJ-4ad-29@gated-at.bofh.it>
Declare snd_timer_hardware structures as const as their only usage
is during a copy operation. As they are not modified anywhere, they
can be made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/pci/emu10k1/timer.c      | 2 +-
 sound/pci/ymfpci/ymfpci_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
index b69a7f8..cf43908 100644
--- a/sound/pci/emu10k1/timer.c
+++ b/sound/pci/emu10k1/timer.c
@@ -66,7 +66,7 @@ static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_emu10k1_timer_hw = {
+static const struct snd_timer_hardware snd_emu10k1_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
 	.ticks = 1024,
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 1114166..39b1d11 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1938,7 +1938,7 @@ static int snd_ymfpci_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_ymfpci_timer_hw = {
+static const struct snd_timer_hardware snd_ymfpci_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 10417, /* 1 / 96 kHz = 10.41666...us */
 	.ticks = 0x10000,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web