summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-hdmi-dma.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2019-09-23 17:47:23 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:52:40 +0800
commite9623c8a8354d31faebf7c3cae2066d00b6af606 (patch)
treecb3629575fe9db1559c227737a3d6cbe26871b3f /sound/soc/fsl/imx-hdmi-dma.c
parent0ee873881b94a698c290337d84e3f8b15d955ac0 (diff)
ASoC: imx-hdmi-dma: Fix issue with dma_alloc_coherent
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/imx-hdmi-dma.c')
-rw-r--r--sound/soc/fsl/imx-hdmi-dma.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
index d7dad63bf773..95402a23560a 100644
--- a/sound/soc/fsl/imx-hdmi-dma.c
+++ b/sound/soc/fsl/imx-hdmi-dma.c
@@ -1123,7 +1123,11 @@ static int imx_soc_platform_probe(struct platform_device *pdev)
return -ENOMEM;
}
- priv->hdmi_sdma_t = dma_alloc_coherent(NULL,
+ ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
+
+ priv->hdmi_sdma_t = dma_alloc_coherent(&pdev->dev,
sizeof(struct hdmi_sdma_script),
&priv->phy_hdmi_sdma_t, GFP_KERNEL);
if (!priv->hdmi_sdma_t) {
@@ -1157,7 +1161,7 @@ static int imx_soc_platform_probe(struct platform_device *pdev)
return 0;
err_plat:
- dma_free_coherent(NULL, sizeof(struct hdmi_sdma_script),
+ dma_free_coherent(&pdev->dev, sizeof(struct hdmi_sdma_script),
priv->hdmi_sdma_t, priv->phy_hdmi_sdma_t);
return ret;
@@ -1167,7 +1171,7 @@ static int imx_soc_platform_remove(struct platform_device *pdev)
{
struct hdmi_dma_priv *priv = dev_get_drvdata(&pdev->dev);
- dma_free_coherent(NULL, sizeof(struct hdmi_sdma_script),
+ dma_free_coherent(&pdev->dev, sizeof(struct hdmi_sdma_script),
priv->hdmi_sdma_t, priv->phy_hdmi_sdma_t);
return 0;