Commit 1dfec395 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: switch over to use snd_soc_register_component() on goni_wm8994

parent fc466ba3
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -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);
}