summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sprd/sprd-pcm-dma.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sprd/sprd-pcm-dma.c b/sound/soc/sprd/sprd-pcm-dma.c
index 9be6d4b2bf74..d38ebbbbf169 100644
--- a/sound/soc/sprd/sprd-pcm-dma.c
+++ b/sound/soc/sprd/sprd-pcm-dma.c
@@ -6,6 +6,7 @@
6#include <linux/dma/sprd-dma.h> 6#include <linux/dma/sprd-dma.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/of_reserved_mem.h>
9#include <linux/platform_device.h> 10#include <linux/platform_device.h>
10#include <sound/pcm.h> 11#include <sound/pcm.h>
11#include <sound/pcm_params.h> 12#include <sound/pcm_params.h>
@@ -530,8 +531,14 @@ static const struct snd_soc_component_driver sprd_soc_component = {
530 531
531static int sprd_soc_platform_probe(struct platform_device *pdev) 532static int sprd_soc_platform_probe(struct platform_device *pdev)
532{ 533{
534 struct device_node *np = pdev->dev.of_node;
533 int ret; 535 int ret;
534 536
537 ret = of_reserved_mem_device_init_by_idx(&pdev->dev, np, 0);
538 if (ret)
539 dev_warn(&pdev->dev,
540 "no reserved DMA memory for audio platform device\n");
541
535 ret = devm_snd_soc_register_component(&pdev->dev, &sprd_soc_component, 542 ret = devm_snd_soc_register_component(&pdev->dev, &sprd_soc_component,
536 NULL, 0); 543 NULL, 0);
537 if (ret) 544 if (ret)