ASoC: switch over to use snd_soc_register_component() on davinci mcasp
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
ee226ce195
commit
eeef0eda7a
|
@ -962,6 +962,10 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_component_driver davinci_mcasp_component = {
|
||||||
|
.name = "davinci-mcasp",
|
||||||
|
};
|
||||||
|
|
||||||
static const struct of_device_id mcasp_dt_ids[] = {
|
static const struct of_device_id mcasp_dt_ids[] = {
|
||||||
{
|
{
|
||||||
.compatible = "ti,dm646x-mcasp-audio",
|
.compatible = "ti,dm646x-mcasp-audio",
|
||||||
|
@ -1170,7 +1174,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
dma_data->channel = res->start;
|
dma_data->channel = res->start;
|
||||||
dev_set_drvdata(&pdev->dev, dev);
|
dev_set_drvdata(&pdev->dev, dev);
|
||||||
ret = snd_soc_register_dai(&pdev->dev, &davinci_mcasp_dai[pdata->op_mode]);
|
ret = snd_soc_register_component(&pdev->dev, &davinci_mcasp_component,
|
||||||
|
&davinci_mcasp_dai[pdata->op_mode], 1);
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto err_release_clk;
|
goto err_release_clk;
|
||||||
|
@ -1178,13 +1183,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
||||||
ret = davinci_soc_platform_register(&pdev->dev);
|
ret = davinci_soc_platform_register(&pdev->dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
|
dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
|
||||||
goto err_unregister_dai;
|
goto err_unregister_component;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_unregister_dai:
|
err_unregister_component:
|
||||||
snd_soc_unregister_dai(&pdev->dev);
|
snd_soc_unregister_component(&pdev->dev);
|
||||||
err_release_clk:
|
err_release_clk:
|
||||||
pm_runtime_put_sync(&pdev->dev);
|
pm_runtime_put_sync(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
@ -1194,7 +1199,7 @@ err_release_clk:
|
||||||
static int davinci_mcasp_remove(struct platform_device *pdev)
|
static int davinci_mcasp_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
|
||||||
snd_soc_unregister_dai(&pdev->dev);
|
snd_soc_unregister_component(&pdev->dev);
|
||||||
davinci_soc_platform_unregister(&pdev->dev);
|
davinci_soc_platform_unregister(&pdev->dev);
|
||||||
|
|
||||||
pm_runtime_put_sync(&pdev->dev);
|
pm_runtime_put_sync(&pdev->dev);
|
||||||
|
|
Loading…
Reference in a new issue