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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: [PATCH 06/14] ASoC: intel: constify snd_soc_dai_ops structures
Date: Fri, 18 Aug 2017 17:36:03 +0530 [thread overview]
Message-ID: <1503057971-16033-7-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/intel/atom/sst-mfld-platform-pcm.c | 6 +++---
sound/soc/intel/skylake/skl-pcm.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index b082b31..49c7b88 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -471,7 +471,7 @@ static void sst_disable_ssp(struct snd_pcm_substream *substream,
}
}
-static struct snd_soc_dai_ops sst_media_dai_ops = {
+static const struct snd_soc_dai_ops sst_media_dai_ops = {
.startup = sst_media_open,
.shutdown = sst_media_close,
.prepare = sst_media_prepare,
@@ -480,11 +480,11 @@ static void sst_disable_ssp(struct snd_pcm_substream *substream,
.mute_stream = sst_media_digital_mute,
};
-static struct snd_soc_dai_ops sst_compr_dai_ops = {
+static const struct snd_soc_dai_ops sst_compr_dai_ops = {
.mute_stream = sst_media_digital_mute,
};
-static struct snd_soc_dai_ops sst_be_dai_ops = {
+static const struct snd_soc_dai_ops sst_be_dai_ops = {
.startup = sst_enable_ssp,
.hw_params = sst_be_hw_params,
.set_fmt = sst_set_format,
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 0ebea34a..b1f2dba 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -628,7 +628,7 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,
return 0;
}
-static struct snd_soc_dai_ops skl_pcm_dai_ops = {
+static const struct snd_soc_dai_ops skl_pcm_dai_ops = {
.startup = skl_pcm_open,
.shutdown = skl_pcm_close,
.prepare = skl_pcm_prepare,
@@ -637,15 +637,15 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,
.trigger = skl_pcm_trigger,
};
-static struct snd_soc_dai_ops skl_dmic_dai_ops = {
+static const struct snd_soc_dai_ops skl_dmic_dai_ops = {
.hw_params = skl_be_hw_params,
};
-static struct snd_soc_dai_ops skl_be_ssp_dai_ops = {
+static const struct snd_soc_dai_ops skl_be_ssp_dai_ops = {
.hw_params = skl_be_hw_params,
};
-static struct snd_soc_dai_ops skl_link_dai_ops = {
+static const struct snd_soc_dai_ops skl_link_dai_ops = {
.prepare = skl_link_pcm_prepare,
.hw_params = skl_link_hw_params,
.hw_free = skl_link_hw_free,
--
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 ` [PATCH 04/14] ASoC: fsl: " Arvind Yadav
2017-08-18 12:19 ` 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 ` Arvind Yadav [this message]
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-7-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).