ASoC: Replace remaining uses of snd_soc_cnew with snd_soc_add_controls.
The drivers are basically duplicating the same code over and over. As snd_soc_cnew is going to be made static some time after the next merge window, we might as well convert them now. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:

committed by
Mark Brown

parent
6f7cb44ba1
commit
eb5f6d753e
@@ -248,7 +248,7 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = {
|
||||
|
||||
static int n810_aic33_init(struct snd_soc_codec *codec)
|
||||
{
|
||||
int i, err;
|
||||
int err;
|
||||
|
||||
/* Not connected */
|
||||
snd_soc_dapm_nc_pin(codec, "MONO_LOUT");
|
||||
@@ -256,12 +256,10 @@ static int n810_aic33_init(struct snd_soc_codec *codec)
|
||||
snd_soc_dapm_nc_pin(codec, "HPRCOM");
|
||||
|
||||
/* Add N810 specific controls */
|
||||
for (i = 0; i < ARRAY_SIZE(aic33_n810_controls); i++) {
|
||||
err = snd_ctl_add(codec->card,
|
||||
snd_soc_cnew(&aic33_n810_controls[i], codec, NULL));
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
err = snd_soc_add_controls(codec, aic33_n810_controls,
|
||||
ARRAY_SIZE(aic33_n810_controls));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
/* Add N810 specific widgets */
|
||||
snd_soc_dapm_new_controls(codec, aic33_dapm_widgets,
|
||||
|
Reference in New Issue
Block a user