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


Groups > linux.kernel > #1714841 > unrolled thread

[PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-18 14:10 +0200
Last post2017-08-18 14:20 +0200
Articles 2 — 2 participants

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 04/14] ASoC: fsl: constify snd_soc_dai_ops structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-18 14:10 +0200
    Re: [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures Mark Brown <broonie@kernel.org> - 2017-08-18 14:20 +0200

#1714841 — [PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-18 14:10 +0200
Subject[PATCH 04/14] ASoC: fsl: constify snd_soc_dai_ops structures
Message-ID<ufOg9-3uF-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1714858

FromMark Brown <broonie@kernel.org>
Date2017-08-18 14:20 +0200
Message-ID<ufOpP-3Ax-1@gated-at.bofh.it>
In reply to#1714841

[Multipart message — attachments visible in raw view] — view raw

On Fri, Aug 18, 2017 at 05:36:01PM +0530, Arvind Yadav wrote:
> 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.

Same here...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web