aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2015-06-01 17:57:53 -0400
committerMark Brown <broonie@kernel.org>2015-06-02 13:18:03 -0400
commit5353f65b859255a07e8bf5c096be4d5d268b46e8 (patch)
tree26948c9dd1c0003c5cbdc38d54d10d8d77d2730d
parent4a6c2aa19d5b6dcd6078d1e0db2a88407b926ded (diff)
ASoC: dapm: fix snd_soc_dapm_new_control() implicit declaration
The change fixes the following compilation problem: sound/soc/soc-dapm.c: In function 'dapm_kcontrol_data_alloc': sound/soc/soc-dapm.c:388:4: error: implicit declaration of function 'snd_soc_dapm_new_control' [-Werror=implicit-function-declaration] data->widget = snd_soc_dapm_new_control(widget->dapm, ^ sound/soc/soc-dapm.c:387:17: warning: assignment makes pointer from integer without a cast [enabled by default] data->widget = snd_soc_dapm_new_control(widget->dapm, ^ sound/soc/soc-dapm.c: At top level: sound/soc/soc-dapm.c:3269:1: error: conflicting types for 'snd_soc_dapm_new_control' snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, ^ In addition to the fix add static qualifier to snd_soc_dapm_new_control() function to silence checkpatch. Fixes: 02aa78abec ("ASoC: DAPM: Add APIs to create individual DAPM controls.") Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-dapm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 3c53db0034ef..92d57a952bd9 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -52,6 +52,11 @@ static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
52 const char *control, 52 const char *control,
53 int (*connected)(struct snd_soc_dapm_widget *source, 53 int (*connected)(struct snd_soc_dapm_widget *source,
54 struct snd_soc_dapm_widget *sink)); 54 struct snd_soc_dapm_widget *sink));
55
56static struct snd_soc_dapm_widget *
57snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
58 const struct snd_soc_dapm_widget *widget);
59
55struct snd_soc_dapm_widget * 60struct snd_soc_dapm_widget *
56snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, 61snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
57 const struct snd_soc_dapm_widget *widget); 62 const struct snd_soc_dapm_widget *widget);
@@ -3265,7 +3270,7 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
3265} 3270}
3266EXPORT_SYMBOL_GPL(snd_soc_dapm_put_pin_switch); 3271EXPORT_SYMBOL_GPL(snd_soc_dapm_put_pin_switch);
3267 3272
3268struct snd_soc_dapm_widget * 3273static struct snd_soc_dapm_widget *
3269snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, 3274snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
3270 const struct snd_soc_dapm_widget *widget) 3275 const struct snd_soc_dapm_widget *widget)
3271{ 3276{