mirror of https://gitee.com/openkylin/linux.git
ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component()
We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7422104037
commit
cb9002a186
|
@ -473,19 +473,17 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, info);
|
dev_set_drvdata(&pdev->dev, info);
|
||||||
|
|
||||||
err = snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
|
err = devm_snd_soc_register_component(&pdev->dev, &ep93xx_i2s_component,
|
||||||
&ep93xx_i2s_dai, 1);
|
&ep93xx_i2s_dai, 1);
|
||||||
if (err)
|
if (err)
|
||||||
goto fail_put_lrclk;
|
goto fail_put_lrclk;
|
||||||
|
|
||||||
err = devm_ep93xx_pcm_platform_register(&pdev->dev);
|
err = devm_ep93xx_pcm_platform_register(&pdev->dev);
|
||||||
if (err)
|
if (err)
|
||||||
goto fail_unregister;
|
goto fail_put_lrclk;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail_unregister:
|
|
||||||
snd_soc_unregister_component(&pdev->dev);
|
|
||||||
fail_put_lrclk:
|
fail_put_lrclk:
|
||||||
clk_put(info->lrclk);
|
clk_put(info->lrclk);
|
||||||
fail_put_sclk:
|
fail_put_sclk:
|
||||||
|
@ -500,7 +498,6 @@ static int ep93xx_i2s_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
|
struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
|
||||||
|
|
||||||
snd_soc_unregister_component(&pdev->dev);
|
|
||||||
clk_put(info->lrclk);
|
clk_put(info->lrclk);
|
||||||
clk_put(info->sclk);
|
clk_put(info->sclk);
|
||||||
clk_put(info->mclk);
|
clk_put(info->mclk);
|
||||||
|
|
Loading…
Reference in New Issue