ASoC: switch over to use snd_soc_register_component() on goni_wm8994

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Kuninori Morimoto 2013-03-21 03:36:17 -07:00 committed by Mark Brown
parent fc466ba3ee
commit 1dfec3954e
1 changed files with 8 additions and 3 deletions

View File

@ -218,6 +218,10 @@ static struct snd_soc_dai_driver voice_dai = {
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
};
static const struct snd_soc_component_driver voice_component = {
.name = "goni-voice",
};
static struct snd_soc_ops goni_voice_ops = {
.hw_params = goni_voice_hw_params,
};
@ -270,7 +274,8 @@ static int __init goni_init(void)
return -ENOMEM;
/* register voice DAI here */
ret = snd_soc_register_dai(&goni_snd_device->dev, &voice_dai);
ret = snd_soc_register_component(&goni_snd_device->dev, &voice_component,
&voice_dai, 1);
if (ret) {
platform_device_put(goni_snd_device);
return ret;
@ -280,7 +285,7 @@ static int __init goni_init(void)
ret = platform_device_add(goni_snd_device);
if (ret) {
snd_soc_unregister_dai(&goni_snd_device->dev);
snd_soc_unregister_component(&goni_snd_device->dev);
platform_device_put(goni_snd_device);
}
@ -289,7 +294,7 @@ static int __init goni_init(void)
static void __exit goni_exit(void)
{
snd_soc_unregister_dai(&goni_snd_device->dev);
snd_soc_unregister_component(&goni_snd_device->dev);
platform_device_unregister(goni_snd_device);
}