aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs/mxs-pcm.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-05-11 22:24:16 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-12 11:04:58 +0100
commit4da3fe7851f9288c2479186d390b0de28d51bdb0 (patch)
tree53904cf3ba487e755b1f32e76134b41dd001a6e1 /sound/soc/mxs/mxs-pcm.c
parentASoC: fsl: fix the binding of imx-sgtl5000 (diff)
downloadlinux-dev-4da3fe7851f9288c2479186d390b0de28d51bdb0.tar.xz
linux-dev-4da3fe7851f9288c2479186d390b0de28d51bdb0.zip
ASoC: mxs: mxs-pcm does not need to be a plaform_driver
Same as the commit 518de86 (ASoC: tegra: register 'platform' from DAIs, get rid of pdev), it makes mxs-pcm not a platform_driver but helper to register "platform", so that the platform_device for mxs-pcm can be saved completely. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/mxs/mxs-pcm.c')
-rw-r--r--sound/soc/mxs/mxs-pcm.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c
index e373fbbc97a0..373dec90579f 100644
--- a/sound/soc/mxs/mxs-pcm.c
+++ b/sound/soc/mxs/mxs-pcm.c
@@ -220,28 +220,16 @@ static struct snd_soc_platform_driver mxs_soc_platform = {
.pcm_free = mxs_pcm_free,
};
-static int __devinit mxs_soc_platform_probe(struct platform_device *pdev)
+int __devinit mxs_pcm_platform_register(struct device *dev)
{
- return snd_soc_register_platform(&pdev->dev, &mxs_soc_platform);
+ return snd_soc_register_platform(dev, &mxs_soc_platform);
}
+EXPORT_SYMBOL_GPL(mxs_pcm_platform_register);
-static int __devexit mxs_soc_platform_remove(struct platform_device *pdev)
+void __devexit mxs_pcm_platform_unregister(struct device *dev)
{
- snd_soc_unregister_platform(&pdev->dev);
-
- return 0;
+ snd_soc_unregister_platform(dev);
}
-
-static struct platform_driver mxs_pcm_driver = {
- .driver = {
- .name = "mxs-pcm-audio",
- .owner = THIS_MODULE,
- },
- .probe = mxs_soc_platform_probe,
- .remove = __devexit_p(mxs_soc_platform_remove),
-};
-
-module_platform_driver(mxs_pcm_driver);
+EXPORT_SYMBOL_GPL(mxs_pcm_platform_unregister);
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:mxs-pcm-audio");