From e383c467ceeee3b040444d6dcd27f331d72b1426 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 8 Mar 2013 13:44:26 +0100 Subject: ASoC: core: Drop unused "dapm" field form soc_enum struct This field was added in commit 2e72f8e ("ASoC: New enum type: value_enum"), but has never been used since. Considering that the soc_enum struct is usually shared between all instances of a CODEC, it also doesn't make much sense to have a pointer to DAPM specific data in it. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index a6a059ca3874..c84062b22221 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1086,7 +1086,6 @@ struct soc_enum { unsigned int mask; const char * const *texts; const unsigned int *values; - void *dapm; }; /* codec IO */ -- cgit v1.2.3 From a93f8e76a446e0a146a169cc2cc82bf1e145ad35 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 8 Mar 2013 13:44:27 +0100 Subject: ASoC: core: Remove unused "n_widgets" field from snd_soc_dapm struct Commit 497098be ("ASoC: dapm: Remove bodges for no-widget CODECs") removed the last user of the n_widgets field. Currently it is incremented for each widget added, but the value is never used, so we can remove it. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc-dapm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e1ef63d4a5c4..d4c004929ae5 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -565,7 +565,6 @@ struct snd_soc_dapm_update { /* DAPM context */ struct snd_soc_dapm_context { - int n_widgets; /* number of widgets in this context */ enum snd_soc_bias_level bias_level; enum snd_soc_bias_level suspend_bias_level; struct delayed_work delayed_work; -- cgit v1.2.3 From d79e57db84f8359bc96418900f86b8fc4189eff9 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 27 Mar 2013 12:02:22 +0100 Subject: ASoC: Constify the 'driver' field of snd_soc_platform The ASoC core does no not modify the driver of a platform. Making it const allows ASoC platform drivers to declare the snd_soc_platform_driver struct as const. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index c84062b22221..5fb70d1e8cce 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -371,7 +371,7 @@ int snd_soc_suspend(struct device *dev); int snd_soc_resume(struct device *dev); int snd_soc_poweroff(struct device *dev); int snd_soc_register_platform(struct device *dev, - struct snd_soc_platform_driver *platform_drv); + const struct snd_soc_platform_driver *platform_drv); void snd_soc_unregister_platform(struct device *dev); int snd_soc_register_codec(struct device *dev, const struct snd_soc_codec_driver *codec_drv, @@ -823,7 +823,7 @@ struct snd_soc_platform { const char *name; int id; struct device *dev; - struct snd_soc_platform_driver *driver; + const struct snd_soc_platform_driver *driver; struct mutex mutex; unsigned int suspended:1; /* platform is suspended */ -- cgit v1.2.3 From 1f03f55b0ca679f950148954e807feb22cff325c Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 27 Mar 2013 12:02:23 +0100 Subject: ASoC: Constify the 'ops' field of snd_soc_platform_driver The ASoC core does not modify a platform driver's ops structure. Making it const allows ASoC platform drivers to declare their snd_pcm_ops struct as const. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 5fb70d1e8cce..966a854fc054 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -801,7 +801,7 @@ struct snd_soc_platform_driver { struct snd_soc_dai *); /* platform stream pcm ops */ - struct snd_pcm_ops *ops; + const struct snd_pcm_ops *ops; /* platform stream compress ops */ struct snd_compr_ops *compr_ops; -- cgit v1.2.3 From ef03c9ae967bf1b40bec1456f7e744033853a01d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 27 Mar 2013 12:02:24 +0100 Subject: ASoC: Constify the 'compr_ops' field of snd_soc_platform_driver 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 Signed-off-by: Mark Brown --- include/sound/soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 966a854fc054..f619905f0a65 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -804,7 +804,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); -- cgit v1.2.3