diff options
author | Ian Molton <ian@mnementh.co.uk> | 2009-01-08 19:23:21 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-01-09 05:39:49 -0500 |
commit | 3e8e1952e3a3dd59b11233a532ca68e6471742d9 (patch) | |
tree | 3dff59c0b09cbcbc0e4b80a00cecd507219a821c /include/sound/soc.h | |
parent | a6ba2b2dabb583e7820e567fb309d771b50cb9ff (diff) |
ASoC: cleanup duplicated code.
Many codec drivers were implementing cookie-cutter copies of the function
that adds kcontrols to the codec.
This patch moves this code to a common function snd_soc_add_controls() in
soc-core.c and updates all drivers using copies of this function to use the
new common version.
[Edited to raise priority of error log message and document parameters.
-- broonie]
Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 9c3ef6a3e9fb..9d5a0362a055 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -214,6 +214,8 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | |||
214 | */ | 214 | */ |
215 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | 215 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, |
216 | void *data, char *long_name); | 216 | void *data, char *long_name); |
217 | int snd_soc_add_controls(struct snd_soc_codec *codec, | ||
218 | const struct snd_kcontrol_new *controls, int num_controls); | ||
217 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, | 219 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, |
218 | struct snd_ctl_elem_info *uinfo); | 220 | struct snd_ctl_elem_info *uinfo); |
219 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, | 221 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, |