Commit edd98a1a authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: au1x: Convert to devm_snd_soc_register_platform

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bc0195aa
...@@ -344,14 +344,8 @@ static int au1xpsc_pcm_drvprobe(struct platform_device *pdev) ...@@ -344,14 +344,8 @@ static int au1xpsc_pcm_drvprobe(struct platform_device *pdev)
platform_set_drvdata(pdev, dmadata); platform_set_drvdata(pdev, dmadata);
return snd_soc_register_platform(&pdev->dev, &au1xpsc_soc_platform); return devm_snd_soc_register_platform(&pdev->dev,
} &au1xpsc_soc_platform);
static int au1xpsc_pcm_drvremove(struct platform_device *pdev)
{
snd_soc_unregister_platform(&pdev->dev);
return 0;
} }
static struct platform_driver au1xpsc_pcm_driver = { static struct platform_driver au1xpsc_pcm_driver = {
...@@ -359,7 +353,6 @@ static struct platform_driver au1xpsc_pcm_driver = { ...@@ -359,7 +353,6 @@ static struct platform_driver au1xpsc_pcm_driver = {
.name = "au1xpsc-pcm", .name = "au1xpsc-pcm",
}, },
.probe = au1xpsc_pcm_drvprobe, .probe = au1xpsc_pcm_drvprobe,
.remove = au1xpsc_pcm_drvremove,
}; };
module_platform_driver(au1xpsc_pcm_driver); module_platform_driver(au1xpsc_pcm_driver);
......
...@@ -312,14 +312,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev) ...@@ -312,14 +312,8 @@ static int alchemy_pcm_drvprobe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctx); platform_set_drvdata(pdev, ctx);
return snd_soc_register_platform(&pdev->dev, &alchemy_pcm_soc_platform); return devm_snd_soc_register_platform(&pdev->dev,
} &alchemy_pcm_soc_platform);
static int alchemy_pcm_drvremove(struct platform_device *pdev)
{
snd_soc_unregister_platform(&pdev->dev);
return 0;
} }
static struct platform_driver alchemy_pcmdma_driver = { static struct platform_driver alchemy_pcmdma_driver = {
...@@ -327,7 +321,6 @@ static struct platform_driver alchemy_pcmdma_driver = { ...@@ -327,7 +321,6 @@ static struct platform_driver alchemy_pcmdma_driver = {
.name = "alchemy-pcm-dma", .name = "alchemy-pcm-dma",
}, },
.probe = alchemy_pcm_drvprobe, .probe = alchemy_pcm_drvprobe,
.remove = alchemy_pcm_drvremove,
}; };
module_platform_driver(alchemy_pcmdma_driver); module_platform_driver(alchemy_pcmdma_driver);
......
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