summaryrefslogtreecommitdiff
path: root/sound/soc/spear/spdif_out.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-12-10 19:35:24 (GMT)
committerMark Brown <broonie@linaro.org>2013-12-18 18:55:02 (GMT)
commitede38884ac25ed78e43f3480056670963a9980f0 (patch)
tree9c9c434b532a9f0faf4b248b1d2d6c8afcb40785 /sound/soc/spear/spdif_out.c
parentd71b3ef44f9e5cfda2499768f6420b784845af06 (diff)
downloadlinux-ede38884ac25ed78e43f3480056670963a9980f0.tar.xz
ASoC: SPEAr: get rid of spear-pcm-audio struct device
Modify the SPEAr PCM driver so that it's a utility library that can be registered on each DAI, rather than a separate struct device. This is more in line with how many recent DT-converted platforms operate, and avoids the need for yet another struct device. This is also required as a pre-cursor to removing spear_pcm_request_chan(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/spear/spdif_out.c')
-rw-r--r--sound/soc/spear/spdif_out.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index b6ef6f7..731a1e0 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -22,6 +22,7 @@
#include <sound/spear_dma.h>
#include <sound/spear_spdif.h>
#include "spdif_out_regs.h"
+#include "spear_pcm.h"
struct spdif_out_params {
u32 rate;
@@ -280,6 +281,7 @@ static int spdif_out_probe(struct platform_device *pdev)
struct spdif_out_dev *host;
struct spear_spdif_platform_data *pdata;
struct resource *res;
+ int ret;
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
if (!host) {
@@ -306,8 +308,12 @@ static int spdif_out_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, host);
- return devm_snd_soc_register_component(&pdev->dev, &spdif_out_component,
- &spdif_out_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev, &spdif_out_component,
+ &spdif_out_dai, 1);
+ if (ret)
+ return ret;
+
+ return devm_spear_pcm_platform_register(&pdev->dev);
}
#ifdef CONFIG_PM