[alsa-devel] [PATCH 3/3] ASoC: Constify the 'compr_ops' field of snd_soc_platform_driver

Lars-Peter Clausen lars at metafoo.de
Wed Mar 27 12:02:24 CET 2013


The ASoC core does not modify a platform driver's compr_ops structure. Making it
const allows ASoC platform drivers to declare their snd_compr_ops struct as
const.

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 include/sound/soc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index eae9c10..9eb0e4d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -810,7 +810,7 @@ struct snd_soc_platform_driver {
 	const struct snd_pcm_ops *ops;
 
 	/* platform stream compress ops */
-	struct snd_compr_ops *compr_ops;
+	const struct snd_compr_ops *compr_ops;
 
 	/* platform stream completion event */
 	int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
-- 
1.8.0



More information about the Alsa-devel mailing list