]> Pileus Git - ~andy/linux/commitdiff
ASoC: mxs: Use devm_snd_dmaengine_pcm_register()
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 28 Nov 2013 07:50:37 +0000 (08:50 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 2 Dec 2013 11:49:36 +0000 (11:49 +0000)
Makes the code shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/mxs/mxs-pcm.c
sound/soc/mxs/mxs-pcm.h
sound/soc/mxs/mxs-saif.c

index b16abbbf7764beddd61d42514f70bd33338a7781..04a6b0d60944e1b13350dac3fd2fa708dd3c64d5 100644 (file)
@@ -56,16 +56,10 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = {
 
 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_HALF_DUPLEX);
 }
 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");
index bc685b67cac71e80c17657357c9eb388eac0ac2e..035ea0436ca5fe83a83b210ba101ad90650acca3 100644 (file)
@@ -20,6 +20,5 @@
 #define _MXS_PCM_H
 
 int mxs_pcm_platform_register(struct device *dev);
-void mxs_pcm_platform_unregister(struct device *dev);
 
 #endif
index 54e622acac330d82a92d95164ae79e89cfb461e4..92db74dc3177c3393acfd333ee6e078af86f4da4 100644 (file)
@@ -804,13 +804,6 @@ static int mxs_saif_probe(struct platform_device *pdev)
        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[] = {
        { .compatible = "fsl,imx28-saif", },
        { /* sentinel */ }
@@ -819,7 +812,6 @@ MODULE_DEVICE_TABLE(of, mxs_saif_dt_ids);
 
 static struct platform_driver mxs_saif_driver = {
        .probe = mxs_saif_probe,
-       .remove = mxs_saif_remove,
 
        .driver = {
                .name = "mxs-saif",