diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2019-09-23 17:47:23 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:52:40 +0800 |
commit | e9623c8a8354d31faebf7c3cae2066d00b6af606 (patch) | |
tree | cb3629575fe9db1559c227737a3d6cbe26871b3f /sound/soc/fsl/imx-hdmi-dma.c | |
parent | 0ee873881b94a698c290337d84e3f8b15d955ac0 (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.c | 10 |
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; |