diff options
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 9321e5c9d8c1..c2e67f1f194c 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -962,6 +962,10 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = { | |||
962 | 962 | ||
963 | }; | 963 | }; |
964 | 964 | ||
965 | static const struct snd_soc_component_driver davinci_mcasp_component = { | ||
966 | .name = "davinci-mcasp", | ||
967 | }; | ||
968 | |||
965 | static const struct of_device_id mcasp_dt_ids[] = { | 969 | static const struct of_device_id mcasp_dt_ids[] = { |
966 | { | 970 | { |
967 | .compatible = "ti,dm646x-mcasp-audio", | 971 | .compatible = "ti,dm646x-mcasp-audio", |
@@ -1170,7 +1174,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
1170 | 1174 | ||
1171 | dma_data->channel = res->start; | 1175 | dma_data->channel = res->start; |
1172 | dev_set_drvdata(&pdev->dev, dev); | 1176 | dev_set_drvdata(&pdev->dev, dev); |
1173 | ret = snd_soc_register_dai(&pdev->dev, &davinci_mcasp_dai[pdata->op_mode]); | 1177 | ret = snd_soc_register_component(&pdev->dev, &davinci_mcasp_component, |
1178 | &davinci_mcasp_dai[pdata->op_mode], 1); | ||
1174 | 1179 | ||
1175 | if (ret != 0) | 1180 | if (ret != 0) |
1176 | goto err_release_clk; | 1181 | goto err_release_clk; |
@@ -1178,13 +1183,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
1178 | ret = davinci_soc_platform_register(&pdev->dev); | 1183 | ret = davinci_soc_platform_register(&pdev->dev); |
1179 | if (ret) { | 1184 | if (ret) { |
1180 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); | 1185 | dev_err(&pdev->dev, "register PCM failed: %d\n", ret); |
1181 | goto err_unregister_dai; | 1186 | goto err_unregister_component; |
1182 | } | 1187 | } |
1183 | 1188 | ||
1184 | return 0; | 1189 | return 0; |
1185 | 1190 | ||
1186 | err_unregister_dai: | 1191 | err_unregister_component: |
1187 | snd_soc_unregister_dai(&pdev->dev); | 1192 | snd_soc_unregister_component(&pdev->dev); |
1188 | err_release_clk: | 1193 | err_release_clk: |
1189 | pm_runtime_put_sync(&pdev->dev); | 1194 | pm_runtime_put_sync(&pdev->dev); |
1190 | pm_runtime_disable(&pdev->dev); | 1195 | pm_runtime_disable(&pdev->dev); |
@@ -1194,7 +1199,7 @@ err_release_clk: | |||
1194 | static int davinci_mcasp_remove(struct platform_device *pdev) | 1199 | static int davinci_mcasp_remove(struct platform_device *pdev) |
1195 | { | 1200 | { |
1196 | 1201 | ||
1197 | snd_soc_unregister_dai(&pdev->dev); | 1202 | snd_soc_unregister_component(&pdev->dev); |
1198 | davinci_soc_platform_unregister(&pdev->dev); | 1203 | davinci_soc_platform_unregister(&pdev->dev); |
1199 | 1204 | ||
1200 | pm_runtime_put_sync(&pdev->dev); | 1205 | pm_runtime_put_sync(&pdev->dev); |