alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: atom: make sst_platform_compr_ops const
@ 2017-09-13 18:38 Bhumika Goyal
  2017-09-19 13:46 ` Applied "ASoC: Intel: atom: make sst_platform_compr_ops const" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-09-13 18:38 UTC (permalink / raw)
  To: julia.lawall, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel
  Cc: Bhumika Goyal

Make this const as it not modified in the file referencing it.
It only stored in the const field 'compr_ops' of a snd_soc_platform_driver
structure. Also, add const to the declaration in the header file.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/soc/intel/atom/sst-mfld-platform-compress.c | 2 +-
 sound/soc/intel/atom/sst-mfld-platform.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/atom/sst-mfld-platform-compress.c b/sound/soc/intel/atom/sst-mfld-platform-compress.c
index 1bead81..1dbcab5 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-compress.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-compress.c
@@ -259,7 +259,7 @@ static int sst_platform_compr_set_metadata(struct snd_compr_stream *cstream,
 	return stream->compr_ops->set_metadata(sst->dev, stream->id, metadata);
 }
 
-struct snd_compr_ops sst_platform_compr_ops = {
+const struct snd_compr_ops sst_platform_compr_ops = {
 
 	.open = sst_platform_compr_open,
 	.free = sst_platform_compr_free,
diff --git a/sound/soc/intel/atom/sst-mfld-platform.h b/sound/soc/intel/atom/sst-mfld-platform.h
index cb32cc7..31a58c2 100644
--- a/sound/soc/intel/atom/sst-mfld-platform.h
+++ b/sound/soc/intel/atom/sst-mfld-platform.h
@@ -25,7 +25,7 @@
 #include "sst-atom-controls.h"
 
 extern struct sst_device *sst;
-extern struct snd_compr_ops sst_platform_compr_ops;
+extern const struct snd_compr_ops sst_platform_compr_ops;
 
 #define SST_MONO		1
 #define SST_STEREO		2
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-19 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 18:38 [PATCH] ASoC: Intel: atom: make sst_platform_compr_ops const Bhumika Goyal
2017-09-19 13:46 ` Applied "ASoC: Intel: atom: make sst_platform_compr_ops const" to the asoc tree Mark Brown

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).