From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, perex@perex.cz, tiwai@suse.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures
Date: Fri, 28 Jul 2017 18:38:29 +0530 [thread overview]
Message-ID: <1501247311-19803-5-git-send-email-bhumirks@gmail.com> (raw)
In-Reply-To: <1501247311-19803-1-git-send-email-bhumirks@gmail.com>
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
next prev parent reply other threads:[~2017-07-28 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 13:08 [PATCH 0/5] ALSA: " Bhumika Goyal
2017-07-28 13:08 ` [PATCH 1/5] ALSA: sound/core: " Bhumika Goyal
2017-07-28 13:08 ` [PATCH 2/5] ALSA: isa: " Bhumika Goyal
2017-07-28 13:08 ` [PATCH 3/5] ALSA: pci: " Bhumika Goyal
2017-07-28 13:08 ` Bhumika Goyal [this message]
2017-07-28 13:08 ` [PATCH 4/5] ALSA: sparc: constify snd_timer_hardware structure Bhumika Goyal
2017-07-28 13:08 ` [PATCH 5/5] ALSA: opl3: constify snd_timer_hardware structures Bhumika Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501247311-19803-5-git-send-email-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®