From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: bardliao@realtek.com, oder_chiou@realtek.com, timur@tabi.org,
lgirdwood@gmail.com, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures
Date: Fri, 18 Aug 2017 17:36:01 +0530 [thread overview]
Message-ID: <1503057971-16033-5-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1503057971-16033-1-git-send-email-arvind.yadav.cs@gmail.com>
snd_soc_dai_ops are not supposed to change at runtime. All functions
working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
const snd_soc_dai_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
sound/soc/fsl/fsl_asrc.c | 2 +-
sound/soc/fsl/fsl_esai.c | 2 +-
sound/soc/fsl/fsl_spdif.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 8cfffa7..806d399 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -542,7 +542,7 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
return 0;
}
-static struct snd_soc_dai_ops fsl_asrc_dai_ops = {
+static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
.hw_params = fsl_asrc_dai_hw_params,
.hw_free = fsl_asrc_dai_hw_free,
.trigger = fsl_asrc_dai_trigger,
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 809a069..cef79a1 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -620,7 +620,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
return 0;
}
-static struct snd_soc_dai_ops fsl_esai_dai_ops = {
+static const struct snd_soc_dai_ops fsl_esai_dai_ops = {
.startup = fsl_esai_startup,
.shutdown = fsl_esai_shutdown,
.trigger = fsl_esai_trigger,
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 1ff467c..7e6cc4d 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -626,7 +626,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
return 0;
}
-static struct snd_soc_dai_ops fsl_spdif_dai_ops = {
+static const struct snd_soc_dai_ops fsl_spdif_dai_ops = {
.startup = fsl_spdif_startup,
.hw_params = fsl_spdif_hw_params,
.trigger = fsl_spdif_trigger,
--
1.9.1
next prev parent reply other threads:[~2017-08-18 12:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 12:05 [PATCH 00/14] constify asoc snd_soc_dai_ops structures Arvind Yadav
2017-08-18 12:05 ` [PATCH 01/14] ASoC: blackfin: constify " Arvind Yadav
2017-08-18 12:17 ` Mark Brown
2017-08-18 12:05 ` [PATCH 02/14] ASoC: codecs: " Arvind Yadav
2017-08-18 12:16 ` Mark Brown
2017-08-18 12:25 ` Applied "ASoC: codecs: constify snd_soc_dai_ops structures" to the asoc tree Mark Brown
2017-08-18 12:06 ` [PATCH 03/14] ASoC: dwc: constify snd_soc_dai_ops structures Arvind Yadav
2017-08-18 12:18 ` Mark Brown
2017-08-18 12:06 ` Arvind Yadav [this message]
2017-08-18 12:19 ` [PATCH 04/14] ASoC: fsl: " Mark Brown
2017-08-18 12:06 ` [PATCH 05/14] ASoC: hisilicon: " Arvind Yadav
2017-08-18 12:20 ` Mark Brown
2017-08-18 12:06 ` [PATCH 06/14] ASoC: intel: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 07/14] ASoC: mediatek: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 08/14] ASoC: pxa: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 09/14] ASoC: rockchip: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 10/14] ASoC: spear: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 11/14] ASoC: sunxi: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 12/14] ASoC: tegra: " Arvind Yadav
2017-08-18 12:06 ` [PATCH 13/14] ASoC: ux500: " Arvind Yadav
2017-08-18 12:25 ` Applied "ASoC: ux500: constify snd_soc_dai_ops structures" to the asoc tree Mark Brown
2017-08-18 12:06 ` [PATCH 14/14] ASoC: zte: constify snd_soc_dai_ops structures Arvind Yadav
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=1503057971-16033-5-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=timur@tabi.org \
/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;
as well as URLs for NNTP newsgroup(s).