Commit 92eaa328 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: switch over to use snd_soc_register_component() on dw i2s

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent eeef0eda
...@@ -297,6 +297,10 @@ static struct snd_soc_dai_ops dw_i2s_dai_ops = { ...@@ -297,6 +297,10 @@ static struct snd_soc_dai_ops dw_i2s_dai_ops = {
.trigger = dw_i2s_trigger, .trigger = dw_i2s_trigger,
}; };
static const struct snd_soc_component_driver dw_i2s_component = {
.name = "dw-i2s",
};
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int dw_i2s_suspend(struct snd_soc_dai *dai) static int dw_i2s_suspend(struct snd_soc_dai *dai)
...@@ -413,7 +417,8 @@ static int dw_i2s_probe(struct platform_device *pdev) ...@@ -413,7 +417,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
dev->dev = &pdev->dev; dev->dev = &pdev->dev;
dev_set_drvdata(&pdev->dev, dev); dev_set_drvdata(&pdev->dev, dev);
ret = snd_soc_register_dai(&pdev->dev, dw_i2s_dai); ret = snd_soc_register_component(&pdev->dev, &dw_i2s_component,
dw_i2s_dai, 1);
if (ret != 0) { if (ret != 0) {
dev_err(&pdev->dev, "not able to register dai\n"); dev_err(&pdev->dev, "not able to register dai\n");
goto err_set_drvdata; goto err_set_drvdata;
...@@ -434,7 +439,7 @@ static int dw_i2s_remove(struct platform_device *pdev) ...@@ -434,7 +439,7 @@ static int dw_i2s_remove(struct platform_device *pdev)
{ {
struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev); struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_dai(&pdev->dev); snd_soc_unregister_component(&pdev->dev);
dev_set_drvdata(&pdev->dev, NULL); dev_set_drvdata(&pdev->dev, NULL);
clk_put(dev->clk); clk_put(dev->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment