Commit 2650bc4f authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: mxs: Use devm_snd_dmaengine_pcm_register()

Makes the code shorter.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a22f33b0
...@@ -56,16 +56,10 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = { ...@@ -56,16 +56,10 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = {
int mxs_pcm_platform_register(struct device *dev) int mxs_pcm_platform_register(struct device *dev)
{ {
return snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config, return devm_snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX); SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX);
} }
EXPORT_SYMBOL_GPL(mxs_pcm_platform_register); EXPORT_SYMBOL_GPL(mxs_pcm_platform_register);
void mxs_pcm_platform_unregister(struct device *dev)
{
snd_dmaengine_pcm_unregister(dev);
}
EXPORT_SYMBOL_GPL(mxs_pcm_platform_unregister);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -20,6 +20,5 @@ ...@@ -20,6 +20,5 @@
#define _MXS_PCM_H #define _MXS_PCM_H
int mxs_pcm_platform_register(struct device *dev); int mxs_pcm_platform_register(struct device *dev);
void mxs_pcm_platform_unregister(struct device *dev);
#endif #endif
...@@ -804,13 +804,6 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -804,13 +804,6 @@ static int mxs_saif_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int mxs_saif_remove(struct platform_device *pdev)
{
mxs_pcm_platform_unregister(&pdev->dev);
return 0;
}
static const struct of_device_id mxs_saif_dt_ids[] = { static const struct of_device_id mxs_saif_dt_ids[] = {
{ .compatible = "fsl,imx28-saif", }, { .compatible = "fsl,imx28-saif", },
{ /* sentinel */ } { /* sentinel */ }
...@@ -819,7 +812,6 @@ MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids); ...@@ -819,7 +812,6 @@ MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids);
static struct platform_driver mxs_saif_driver = { static struct platform_driver mxs_saif_driver = {
.probe = mxs_saif_probe, .probe = mxs_saif_probe,
.remove = mxs_saif_remove,
.driver = { .driver = {
.name = "mxs-saif", .name = "mxs-saif",
......
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